Question: Project Description: Write a program that accepts a date in the form month/day/year and outputs whether or not the date is valid. For example: 5/24/1962
Project Description: Write a program that accepts a date in the form month/day/year and outputs whether or not the date is valid. For example: 5/24/1962 is valid, but 9/31/2000 is not. (September has only 30 days.) Give special consideration to leap years: 2/29/2023 is not valid but 2/29/2024 is valid. A year is a leap year if it is divisible by 4 , unless it is a century year that is not divisible by 400. (1800 and 1900 are not leap years while 1600 and 2000 are.) Make sure your program correctly handles leap years and other years from years 1700 to 2200 . Also make sure that you program handles correctly the missing 11 days in the Julian calendar for 1752 (See Sample Output 4 on the next page). Reference: https: //Www. timeanddate. com/calendar/julian-gregorian-switch.html Requirements : 1. Use easy to understand input and output. 2. Use variable names which are reflective of their meaning. 3. Use named constants if helpful. 4. Use a sufficient number of comments to make your code understandable. 5. Run a sufficient number of sample cases to confirm that you program is working. Compare to online calendar programs as needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
