Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please keep it as simple as possible Im just a beginner. Also its C++ Thank you You can compute the date for any Easter Sunday
Please keep it as simple as possible Im just a beginner. Also its C++ Thank you
You can compute the date for any Easter Sunday between the years of 1900 and 2099 by using the following algorithm: 1) Let a be the value of the year mod 19 2) Let b be the value of the year mod 4 3) Let c be the value of the year mod 7 4) Let d equal (19 * a + 24) mod 30 5) Let e equal (2 * b 4*c+6 * d + 5) mod 7 6) Then, except for the years listed in step 7), Easter Sunday will be on: Mach (22 d+e) Note that this may give dates in April! If the year is 1954, 1981, 2049, or 2076, then subtract 7 from the day obtained above. 7) For these years, this will not cause the month to change Write a program that will prompt the user to enter the year and will calculate and display the date of Easter Sunday for that year. follows (with user input shown in bold): A sample of the desired user interaction Program to find the date of Easter Sunday Enter the year (1900 to 2099) 2019 In 2019, Easter Sunday is on April 21 Make sure the year entered is in the proper range. If not, print an appropriate error (You do not have to validate the 2nd message and allow the user to reenter the year. input.) Note: For a slight bonus, allow the user to determine the date of Easter Sunday for multiple years (one at a time) You should create at least two (2) functions for this program: 1) 2) The main() function A function that, given a year, will compute and return the date of Easter Sunday for that year. Note that both the day and, in some form, the month, must be returned. A couple of ways to handle this will be discussed in class. Also note that this function should not display the date You may, of course, use additional functions if you wish 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