Stuck in 3/7 : While Loop


Anythings goes wrong with my code?


What determines the end of the body of a loop?

It goes like: while (CONDITION) STATEMENT
So the body is a single statement, after that statement, that's outside the loop. To run multiple statements in the loop, one would group multiple statements into one statement, this is done with {}'s
What you've done is you have an empty statement.


The semicolon after ")" bracket. You should not put the semicolon on.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.