Re: Re: faulty while loop
Quote:
Originally posted by MrWizard
I don't even understand what you are trying to accomplish. What does the user input to quit? Try putting some paranthesis around your statements too like this.
while( ((x < 1) || (x > 5)) && ((x < 9) || (x > 9)) );
Something like that. Post back with some more specifics.
This function displays a menu to the user then prompts for input, validating the input information and repeating the menu until the info IS valid. Option 9 will eventually be used to exit the program, but it should be returned like all other options. Instead if you hit 9 it will return it back to main, but any other option will leave you in this menu. Any explanations?
***note, the parentheses, while helping to clarify, did nothing else for my program.***