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 itAn example run of the program is as follows,Please Enter the year in digits: Please Enter the Starting Day of the year Sun, Sat : Sun Mon Tue Wed Thu Fri Sat start on Friday and end on Sunday Sun Mon Tue Wed Thu Fri Sat start on Monday end on Sunday Sun Mon Tue Wed Thu Fri Sat start on Monday end on Wednesday Sun Mon Tue Wed Thu Fri Sat start on Thursday end on Friday Sun Mon Tue Wed Thu Fri Sat start on Saturday end on Sun Mon Tue Wed Thu Fri Sat start Tuesday end on Wednesday Sun Mon Tue Wed Thu Fri Sat start on Thursday end on Saturday Sun Mon Tue Wed Thu Fri Sat start on Sunday end on Tuesday start on Wednesday end on Thursday start on Friday end on Sunday start on Monday end on Thursday start on Wednesday end on Please enter the month: There are Sundays, Saturdays and weekdays in the month.Please Enter the date and the month: is a Friday.Do you want to try again? to continue to quit : Please Enter the date and the month: is a ThursdayDo you want to try again? to continue to quit: Please Enter the date and the month: is a SundayDo you want to try again? to continue to quit : Press any key to continue Part I.The user specifies the year in digits and the day of week the year begins, and the program will print out the 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 displaymonth calendar int days, int startday ; 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 displaydays int days, int startday; 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 to continue and enter to quit from the program
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
