Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(b) Write a complete C++ program (without using function) which prompts the user to key in year and month in order to print out the
(b) Write a complete C++ program (without using function) which prompts the user to key in year and month in order to print out the number of days available in that month. Switch statement is required to determine the number of days of the month based on the input provided. Hints: A year is a leap year if the following two conditions are satisfied: Year is divisible by 400 Year is not divisible by 100 and year is exactly divisible by 4 Your program needs to validate user inputs for Positive year (e.g., 2022 is valid and 1000 is not valid) Month between 1 to 12 Continue Entry with iterative input which accepts uppercase and lowercase letters (e.g., Continue Entry (Y/N): )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started