Question: Day of the week. Write a program that takes a date as input and prints the day of the week that date falls on. Your
Day of the week. Write a program that takes a date as input and prints the day of the week that date falls on. Your program should accept three int commandline arguments: m (month), d (day), and y (year). For m, use 1 for January, 2 for February, and so forth. For output, print 0 for Sunday, 1 for Monday, 2 for Tuesday, and so forth. Use the following formulas, for the Gregorian calendar:
Example: On which day of the week did February 14, 2000 fall?

Yoy (14 m) /12 X = y +%/4 - Y/100 + y/400 mo m+ 12x ((14 m) /12) - 2 do = (d + x + (31 x m) / 12) % 7 -
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
The images provided contain the formulas for Zellers Congruence which is an algorithm devised by Chr... View full answer
Get step-by-step solutions from verified subject matter experts
