Just to be sure:
The input of the program (var x) is always a positive decimal number.
but not integers such as:
(meaning that I will always find the decimal point)
Am I right?
The question has been closed for the following reason "The question is answered, right answer was accepted" by Unai Herrán 23 Feb '12, 10:53
Yes, since it says it's always a decimal number, it should always have a decimal portion. The decimal portion might be 0. In that case, it would just be 2.0.
answered 23 Feb '12, 06:40
You're right, just remember that spaces are not allowed (I'm sure you do remember that and what you've typed is just for more readability:) and also there could be a case like " 27. ", which is also decimal, in fact.
answered 23 Feb '12, 06:43