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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started