I need to write a code that get as an input a double, and if the user puts an "ENTER", it will continue, but the scanf function waits untill the user puts anything exept "ENTER".
Thank you.
|
Newbie Member
|
|
| 2Jan2008,02:09 | #2 |
|
Quote:
Originally Posted by yoavagami if so .. float num; // double scanf("%f",&num); while( !EOF ) // !EndOfFile { scanf("%f",&num); } |
|
Newbie Member
|
|
| 2Jan2008,02:49 | #3 |
|
Its not from a file.. is there some way to exept the "ENTER"? Thanks..
|
|
Go4Expert Founder
|
![]() |
| 2Jan2008,17:11 | #4 |
|
Then when you want to break?
|
|
Newbie Member
|
|
| 2Jan2008,19:15 | #5 |
|
I need to get input a double, and if the user puts "ENTER", it will continue (when I do scanf(%lf,&num); it "waits" untill I input something and just after that it will continue..
(I'm not using files..) |

