#include <studio.h>
int main()
{
int num;
while(1)
printf("Enter the number");
scanf("%d",num);
printf("Your number is %d", num);
return 0;
}
Asked
Active
Viewed 37 times
0

David Ranieri
- 39,972
- 7
- 52
- 94

sm.csgo
- 1
-
2I have indented your code, as you can see the `while` loop only affects the `printf` line, you also have a typo: `studio.h` should be `stdio.h`. Regarding your question, take a look to https://stackoverflow.com/q/17271576/1606345 – David Ranieri Sep 05 '20 at 05:56
-
1You might want to add braces to that while loop. As is, it doesn't look like useful behavior. – luser droog Sep 05 '20 at 06:18
-
1Welcome to Stack Overflow. Please read [the help pages](http://stackoverflow.com/help), take the SO [tour], read [ask], as well as [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Sep 05 '20 at 06:19