int main(void)
{
//declare variables
int number, status;
int i = 1;
//ask the user for the desired number and validate the input. Only numeric input allowed.
do
{
printf("Please enter a number:");
status = scanf("%d", &number);
while(status != 1)
{
printf("The input is not numeric. Please try again:");
status = scanf("%d", &number);
}
//print the amount of asterisks
for(i=1; i<= number; i++)
{
printf("*");
}
printf("\n");
}while(number >= 1);
//end of the program
printf("End\n");
What is really interesting for me is not how to fix the code(I already got an answer)but why the loop is not working. Thanks.