0

I am having an issue with output from a do while loop. Code is below

do
{
    printf ("Height:");
    height=get_int();
}
while (height < 0 || height > 23);

it works for negative numbers and loops "Height" and get_int again. However it will not work for the >23. When a number greater than 23 is entered, it does not loop.

2

That works fine and will reprompt for any value greater than 23.

Is it possible that you haven't run make since your last change? You have to recompile (using make mario) every time you change & save your source code.

  • yes. Thank you. facepalm – SarahToenin Nov 27 '18 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .