Question: Must be coded with C: Write a program to ask the user to input a date of 2017 and calculate which day it is in

Must be coded with C:

Must be coded with C: Write a program to ask the user

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:3 Nov:30, Dec:31). Name your file Hw4_q3_code.c (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.) Example Hints and Inputs: (purple texts are what the program should print on the screen to instruct the users, the black texts are what the users type in) Input the month: 10 Input the day: 28 Example Outputs: 10/28/2017 is Saturday

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!