I am testing the first part of my code for Mario, pset1. I am using a do while loop because I thought the 'while' will return to the 'do' part if you put in a invalid number. But when I use the terminal and I put in an invalid number it's not asking me the same question again. I get exactly the same reaction when I put in a valid number. What am I doing wrong?
int main(void) { // Here we ask for the hight of the halfpyramid. int hight;
do
{
printf("Give a number for the hight of the pyramid: ");
hight = GetInt();
}
while (hight < 0 && hight > 23);