Stuck in 3/7 : While Loop


#1

Anythings goes wrong with my code?


#2

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.


#3

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


#4

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