Hi, can someone tell me what's wrong with this code?
I want it to ask for an inventory number until the user enters a number between 1-9999 and give an error message if the number is outside of that range.Code:while ((num <= 1) && (num >= 9999)) {
printf("\n");
printf("\tinventory number: ");
scanf("%d", &num);
if (num <= 1)
printf("Invalid entry\n");
printf("Please enter a value greater than or equal to 1\n");
if (num >= 9999)
printf("Invalid entry\n");
printf("Please enter a value less than or equal to 9999");
}
