View Single Post
Old Jun 9th, 2005, 11:02 AM   #13
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
It's clear you need to read the input in as a string (which you should always do, no matter what - it prevents program breaking). Remember, pseudocode is one of the most useful tools you have when programming. For example:
variables:
	string: input
	double: degreesC
	double: degreesF

start loop
	ask for input
	if input is 'Q' or 'q' then break out of loop
	
	(verify input)
	loop through the input string, making sure every character is a number or a dot, and the last character is either a 'C' or an 'F'.
	
	if input ends in 'C':
		copy number portion of input into degreesC
		calculate and print degreesF
	
	else if input ends in 'F':
		copy number portion of input into degreesF
		calculate and print degreesC
end loop
With something like that, you can easily see what you need to do.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote