I am trying to re-promt variables.
In the first variable, the question "Start Size" should be promt for the user if the user enters an number below 9. It´s not working. If for instance I enter number 5 it will ask me "End Size" instead of asking "Start Size" again.
In the second variable, "End Size" should be re-prompted if the number entered is less than or equal to "Start Size". Not working either. I have revised it and compared it to many other similar programmes and I cannot find the error. See the coding below:
In the first variable, the question "Start Size" should be promt for the user if the user enters an number below 9. It´s not working. If for instance I enter number 5 it will ask me "End Size" instead of asking "Start Size" again.
In the second variable, "End Size" should be re-prompted if the number entered is less than or equal to "Start Size". Not working either. I have revised it and compared it to many other similar programmes and I cannot find the error. See the coding below:
Code:
#include<stdio.h>
int main(void)
{
//Ask user start size
{
int x;
do
{
x = get_int("Start Size: ");
}
while (x < 9);
}
//Ask user end size
{
do
{
y = get_int("End Size: ");
}
while (y <= x);
}
}