+ 1
c=1; while c<10 c*=5; cout<<c;
I can't exactly remember the program as I'm just a beginner but what will be this programs output? Am I missing something basic?
1 Answer
+ 2
The answer is 1*5*5 = 25.
When there are no brackets { }, only the next statement is in the while loop (here c*=5). The same goes for if, else, for, etc.