Write a program to enter any number of the year and month, and then determine whether the year is a leap year or not and the number of days for that month. Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 days, No. of month 4, 6, 9, 11= 30 days, No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year) %3D

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question
Write a program to enter any number of the year and month, and then determine
whether the year is a leap year or not and the number of days for that month.
Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 days,
No. of month 4, 6, 9, 11= 30 days,
No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year)
%3D
Transcribed Image Text:Write a program to enter any number of the year and month, and then determine whether the year is a leap year or not and the number of days for that month. Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 days, No. of month 4, 6, 9, 11= 30 days, No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year) %3D
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning