Did you see my first post?
To make Json happy, here's a version without an infinite loop. ;-) It is still just as "unsafe" as an infinite loop, but with different constructs.
What I am offering...
Type: Posts; User: literallyjer
Did you see my first post?
To make Json happy, here's a version without an infinite loop. ;-) It is still just as "unsafe" as an infinite loop, but with different constructs.
What I am offering...
Isn't that the job of the programmer to begin with?
For production code, I would say you're right if there is a case the loop might never stop. If you're just writing a toy program, then there is...
This code will loop until your continueOrdering method returns false. If you have any questions, please ask.
// initialize your variables
int one = 0;
int two = 0;
while (true) {