Write a C++ program that prints a calendar for a given year. You can use the program
Question:
Write a C++ program that prints a calendar for a given year. You can use the program ex74.cpp as the starting point. The program prompts the user for three inputs:
1). The year for which you are generating the calendar.
2). The day of the week that January first is on, you will use the following notation to set the day of the week:
0 Sunday 1 Monday 2 Tuesday 3 Wednesday
4 Thursday 5 Friday 6 Saturday
3). The output file name.
Your program should generate a calendar similar to the one shown in the example output below. The calendar should be printed into the output file. Your program should be able to handle leap years. A leap year is a year in which we have 366 days. That extra day comes at the end of February. Thus, a leap year has 366 days with 29 days in February. A century year is a leap year if it is divisible by 400.other years divisible by 4 but not by 100 are also leap years.
Example: Year 2000 is a leap year because it is divisible by 400. Year 2004 is a leap year because it is divisible by 4 but not by 100.
You can use as many functions as you wish. Your program should clearly describe the functionality of each function and should display the instructions on how to run the program.
University Physics with Modern Physics
ISBN: 978-0321501219
12th Edition
Authors: Hugh D. Young, Roger A. Freedman, Lewis Ford