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

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 c++ to enter any number of the year and month, and then determine whother the year is a leap year or not and the number of days for that month. Note:
1. of month 1, 3, 5, 7, 8, 10, 12 31 days.
2. of month 4, 6, 9, 11-30 days.
3. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap year)

Write a program to enter uny number of the ycar and month, and then dutormine
whother the ycar is a leap yoar or not and the number of days for that month.
Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 duys,
No. of month 4, 6, 9, 11-30 days,
No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap ycar)
Transcribed Image Text:Write a program to enter uny number of the ycar and month, and then dutormine whother the ycar is a leap yoar or not and the number of days for that month. Note: no. of month 1, 3, 5, 7, 8, 10, 12= 31 duys, No. of month 4, 6, 9, 11-30 days, No. of month 2 = 28 days (not a leap year), 2 = 29 (in a leap ycar)
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Algebraic Expressions
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