Hi,
I have program I am working on that will print out a square made out of astericks, depending on what the operator puts in. ie..4
***** The number entered must be between 4 and 20, between
* * being the magic word. I can have it so that if you put in
* * the number 21 or higher, it gives the operator an error
* * statement. Great! But when I put in 4, it begins a loop.
***** Any help on this irratating problem would be most appreciated.. Thanks..Debbie
/* Action begins here. */
printf("Make a square out of astericks!\n");
printf("Enter a number between 4 and 20:\t \n");
scanf("%d", &limit);
/*Checking to see if entered number is between 4 and 20*/
while ( limit < 4 || limit > 20) {
printf("Again, please enter a number between 4 and 20: \n");
scanf("%d", &limit);
}