Thread: Can someone look at my simple program and tell me what is wrong with it?

  1. #16
    Registered User
    Join Date
    Apr 2006
    Actually, I would use a do while loop here. Do while works like this:
    do {
        //code that repeats goes here
    } while(expression); //repeat until expression is false.
    //put code for what to do after the loop here.
    The reason for preferring do while to an infinite loop and a break is that it is more clear to see when the loop terminates.
    Last edited by King Mir; 09-30-2007 at 10:59 PM.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  2. #17
    Registered User
    Join Date
    Sep 2007
    I did it! Thank you so much everyone for your help!

Popular pages Recent additions subscribe to a feed