Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- //short version
- //suppose to scan into float and print it, till instead of float will be entered 'q'
- //MISTAKE it goes in endless cycle instead, once 'q ' is entered
- //longer version with possibility to see, how it works is here
- // https://pastebin.com/JVL3MyYp
- int main()
- {
- float f;
- scanf("%f",&f);
- while( f!= (float)'q')
- {
- printf("f is %f\n",f);
- scanf("%f",&f);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment