[C] While/For loop, EOF and Input question.

My code: http://ideone.com/EZUrSe

I'm trying to get my code to do this:

When given a float input (IE. 2.44) to output its Ceiling, floor and its integer value rounded up. I nailed this part down.

The loop part is confusing me though.

It seems as if its not recognizing EOF when the input is blank(IE they pressed enter) and thus loops forever.

Does anyone know how to fix this?

Also for efficiency, I was wondering if theres anything I can do to better my code here. Any helps appreciated greatly :) thanks!

Posted Feb 22, 2016, 4:17 AM UTC

17
Loading comments…