I have an integer input for my I.D. My teacher says I need to error handle all my inputs and basically display appropriate error messages if input entered is invalid. So I'm trying to get an error message to pop up if the user enters a real number or number less than one. But what I've tried is not working!
printf("Enter client Id--->");
scanf("%d", &client.id);
while ((client.id < 1) || (client.id % 1 != 0)) {
printf("Invalid I.d entered\n");
printf("Enter client Id--->");
scanf("%d", &client.id);
} // endwhile`