Search:

Type: Posts; User: literallyjer

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    8,638

    Re: Reset the value of each variable

    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...
  2. Replies
    5
    Views
    8,638

    Re: Reset the value of each variable

    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...
  3. Replies
    5
    Views
    8,638

    Re: Reset the value of each variable

    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) {
Results 1 to 3 of 3