Question: This program should be in C language. Write a program to ask the user to input a date of 2017 and calculate which day it

This program should be in C language. Write a program to ask the user to input a date of 2017 and calculate which day it is in one week. Assume you already know the first day in 2017 is Sunday. And you also know the number of days in each month. (Jan:31, Feb:28, Mar:31, Apr:30, May:31, Jun:30, Jul:31, Aug:31, Sept:30, Oct:31, Nov:30, Dec:31). (TIP: First calculate how many days there are between 01/01/2017 and the day the user input, then mod the number of days by 7, use the result of mod to infer which day in one week it is. You can use switch inside a for loop to calculate the number of days. And use another switch to print out day in a week based on the result of the mod.)

For Example:

Input the month:10

Input the day:22

10/22/2017 is Sunday!

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 Databases Questions!