Hot answers tagged


while(input>0 && input<9) This is saying that as long as input is greater than zero AND less than nine you will keep doing the do-while loop (namely keep asking for input). I think what you meant to say was that if the input is outside of that range, then you want to keep asking for input. So, repeat the do-while loop if input is less than one ...

Only top voted, non community-wiki answers of a minimum length are eligible