Write a program prompts the user to enter the year


Discuss the below:

Q: Write a program that prompts the user to enter the year and the month and displays on the console the calendar table for the month.

For example, if the user entered 2011 for the year, and 5 for the month, the program should display the calendar for May 2011, as shown for December month in the attached picture.

Example of program action (in the console numbers are formatted to be exactly under the week days):

Enter Year: 2011
Enter Month: 5

May 2011
---------------------------
Sun Mon Tue Wed Thu Fri Sat
1 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 30 31

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program prompts the user to enter the year
Reference No:- TGS01936935

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)