that month. If the entered month is not between 1 and 12, then print “Invalid month". Don't forget about leap years!What is a leap year? In general, years divisible by 4 are leap years. For dates after 1582,however, there is a Gregorian correction: years that are divisible by 100 are not leap years but years divisible by 400, are. So, for instance, 1900 was not a leap year but 2000 was.
Fig: 1