Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSC-210 Project-1 Easter Sunday is the first Sunday after the first moon of spring. To compute the date, you can use this algorithm, invented by

image text in transcribed
CSC-210 Project-1 Easter Sunday is the first Sunday after the first moon of spring. To compute the date, you can use this algorithm, invented by the mathematician Carl Friedrich Gauss in 1800. Steps 1. Let y be the year (such as 1800 or 2012) 2. Divide Y by 19 and call the remainder a Ignore the quotient. 3. Divide Y by 100 to get the quotient and a remaindere 4. Divide bby 4 to get a quotient and a reminder 5. Divide 8 b + 13 by 25 to get a quotient Ignore the remainder 6. Divide 19 a + b d g +15 by 30 to get a remainder h. Ignore the 7. Divide c by 4 to get a quotient and a reminder k. 8. Divide a +11 h by 319 to get a quotient m. Ignore the remainder 9. Divide 2 * 2j- h m . 32 by 7 to get a remainderr. Ignore the 10. Divide h-m+ + 90 by 25 to get a quotient n. Ignore the remainder. 11. Divide numrin 19 by 32 to get a remainder p ignore the quotient. Easter falls day p for monthn For example if you put Yas 2001 then n will equal 4 and p will equal 15 which means in 2001 Easter occurred on Sunday April 15. Write a C++ program that accepts the year as input from the keyboard and determines the date of Easter for that year. The program should request the user for the Year that the user wants to determine the date of Easter The program should have a loop that allows the user to enter multiple years to get multiple Easter dates. The loop and the preprogram should exit if the user enters -1 for the year include using namespace std; Format your input and output as follows to exit) 1985 1 to exit):1986 Please enter the year you wish to find the date for faster For the year 195 Easter falls o rit 7. Please enter the year you wish to find the date for taster For the year 1985 Easter falts en er the year you wish to in the date for taster For the year 2018 Easter falls on Art Please enter the year you wish to find the date for Easter Georges-HP Debug oncartells 1 to exit 2018 to exit-1 Have the output of your program show the date of Easter for the following years. 1957 1986 2001 2005 2008 2014 2015

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

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions