Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank you so much for your help!! Lab 6: Assigned: March 12, 2021 Due: March 19, 2021 (by lab time) Objective: To give you experience

image text in transcribed

Thank you so much for your help!!

Lab 6: Assigned: March 12, 2021 Due: March 19, 2021 (by lab time) Objective: To give you experience with repetition statements Part A: Zeller's congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is given h = 26 (m +1) k i q+ + k + + + 5j 10 4 4 %7 where h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, and 6: Friday). q is the day of the month. m is the month (3: March, 4: April, 12: December). January and February are treated as months 13 and 14 of the previous year (subtract 1). j is year / 100 k is the year of the century (i.e., year % 100). *** Note all divisions in this exercise perform an integer division. Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the week. Sample Output: Enter day (month day year): 3 12 2021 Day of the week is Friday # Notice - m = 14, year = 2019 Enter day (month day year): 2 29 2020 Day of the week is Saturday Enter day (month day year): 5 18 2050 Day of the week is Wednesday

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago