Would anyone be able explain the line in bold to me please? What it looks like to me is that the second printf will be shown if the number entered is lower than 1 or higher than 12. I'm obviously wrong though.Code:#include <stdio.h> #define NO_OF_MONTHS 12 main() { int days[NO_OF_MONTHS] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int month; printf("Please enter a month: "); do { scanf("%d", &month); } while (month < 1 || month > 12); printf("\nThe number of days in month %d is %d\n", month, days [month-1]); }
Thanks in advance.