Question: Write a C program that prints the calendar for a given year and some info about it . An example run of the program is

Write a C program that prints the calendar for a given year and some info about it.An example run of the program is as follows,Please Enter the year in 4 digits: 2021Please Enter the Starting Day of the year (1=Sun, 7=Sat) : 61Sun Mon Tue Wed Thu Fri Sat1 start on Friday and 31 end on Sunday 2Sun Mon Tue Wed Thu Fri Sat1 start on Monday 28 end on Sunday 3Sun Mon Tue Wed Thu Fri Sat1 start on Monday 31 end on Wednesday 4Sun Mon Tue Wed Thu Fri Sat1 start on Thursday 30 end on Friday 5Sun Mon Tue Wed Thu Fri Sat1 start on Saturday 31 end on 316Sun Mon Tue Wed Thu Fri Sat1 start Tuesday 30 end on Wednesday 7Sun Mon Tue Wed Thu Fri Sat1 start on Thursday 31 end on Saturday 8Sun Mon Tue Wed Thu Fri Sat1 start on Sunday 31 end on Tuesday 91 start on Wednesday 30 end on Thursday 101 start on Friday 31 end on Sunday 111 start on Monday 30 end on Thursday 121 start on Wednesday 31 end on 31Please enter the month: 4There are 4 Sundays, 4 Saturdays and 22 weekdays in the month.Please Enter the date and the month: 2344/23 is a Friday.Do you want to try again? (1 to continue/0 to quit) : 1Please Enter the date and the month: 21212/2 is a ThursdayDo you want to try again? (1 to continue/0 to quit): 1Please Enter the date and the month: 3055/30 is a SundayDo you want to try again? (1 to continue/0 to quit) : 0Press any key to continue .. Part I.The user specifies the year in 4 digits and the day of week the year begins, and the program will print out the 12 month calendar for the year. A function is required to display the calendar for a month when the number of days in the month and the start day in the first week in the month were given. The function prototype is as follows,void display_month_ calendar (int days, int start_day) ; /* function to display the calendar for a month. */Part II. The program also displays the info on how many Sundays, Saturdays, and weekdays in a specified month of the year. The following function is needed in the program.void display_days (int days, int start_day);/* function to display how many Saturdays, Sundays, and weekdays in a month *//* when the number of days in the month and the starting day in the first week *//* of the month were given.*/Part III.The program asks the user to enter the date in a month of the year, and prints which day it is in a week. This process will continue until the user decides to quit from the program ( enter 1 to continue and enter 0 to quit from the program).
Write a C program that prints the calendar for a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!