PROBLEM 6: Write a complete program to print the number of days in a given month entered from the keyboard. If the month is February, the year must also be entered to determine if it's a leap year or...


PROBLEM 6: Write a complete program to print the number of days in a given month<br>entered from the keyboard. If the month is February, the year must also be entered to<br>determine if it's a leap year or not. Write 2 versions of the program: the first version<br>accepting int value, using nested if-else structure, the 2nd version accepting char<br>value for the month using switch structure.<br>Sample Input/Output:<br>Enter the month ( 1 to 12): 12 Number of days = 31<br>Enter the month (A to L): B Enter the year: 2021<br>Number of days = 28<br>

Extracted text: PROBLEM 6: Write a complete program to print the number of days in a given month entered from the keyboard. If the month is February, the year must also be entered to determine if it's a leap year or not. Write 2 versions of the program: the first version accepting int value, using nested if-else structure, the 2nd version accepting char value for the month using switch structure. Sample Input/Output: Enter the month ( 1 to 12): 12 Number of days = 31 Enter the month (A to L): B Enter the year: 2021 Number of days = 28

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here