Develop and use your functional decomposition skills to write a C++ program to print a calendar for one year, given just the year by a user. It may help to think of this task as printing 12 calendars, one for each month given (1) a function that determines if the year is a leap year and another function that (2) determines the start day in January of the input year. See link below for a short program that includes two functions that maybe helpful as you develop various functions with algorithms incrementally to generate a 12 month calendar. Imagear.com Each successive month starts on the day of the week that follows the last day of the preceding month. Days of the week should be numbered 0 through 6 for Sunday through Saturday. Sample screen output of the interactive Calendar program with user input validation routines. what year do you want a calendar for? 2820 non digit entered what year do you want a calendar for? 2820 Calendar - 2020 January 567891011 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 February TWTF 2345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question
Develop and use your functional decomposition skills to write a C++ program to print a calendar for one year, given just
the year by a user.
It may help to think of this task as printing 12 calendars, one for each month given (1) a function that determines if the
year is a leap year and another function that (2) determines the start day in January of the input year.
See link below for a short program that includes two functions that maybe helpful as you develop various functions
with algorithms incrementally to generate a 12 month calendar.
learvear.com
Each successive month starts on the day of the week that follows the last day of the preceding month. Days of the
week should be numbered 0 through 6 for Sunday through Saturday.
Sample screen output of the interactive Calendar program with user input validation routines.
what year do you want a calendar for? 2020
non digit entered
What year do you want a calendar for? 2020
Calendar - 2020
January
SMTWTFS
1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
S
February
TWTFS
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
Transcribed Image Text:Develop and use your functional decomposition skills to write a C++ program to print a calendar for one year, given just the year by a user. It may help to think of this task as printing 12 calendars, one for each month given (1) a function that determines if the year is a leap year and another function that (2) determines the start day in January of the input year. See link below for a short program that includes two functions that maybe helpful as you develop various functions with algorithms incrementally to generate a 12 month calendar. learvear.com Each successive month starts on the day of the week that follows the last day of the preceding month. Days of the week should be numbered 0 through 6 for Sunday through Saturday. Sample screen output of the interactive Calendar program with user input validation routines. what year do you want a calendar for? 2020 non digit entered What year do you want a calendar for? 2020 Calendar - 2020 January SMTWTFS 1234 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 S February TWTFS 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Datatypes
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr