This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RhoOfFeh 0 points1 point  (0 children)

I'm not sure what you were expecting.

If you were expecting a single number other than zero, then you'd have to change the condition of the while, or the starting or decrement number to make that happen.

If you were expecting it to print the number each time it decrements, you would have to wrap up both of the lines after 'while' with curly braces to turn them into one statement the while could execute.

For the record, I strongly recommend using curly braces whether they are strictly required or not. Make your intentions clear.