Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(c++) Easter Sunday is the first Sunday after the first full moon of spring. To compare the date, you can use this algorithm invented in
(c++) Easter Sunday is the first Sunday after the first full moon of spring. To compare the date, you can use this algorithm invented in 1800:
- Let y be the year (such as 1975
- Divide y by 19 and call the remainder a. Ignore the quotient
- Divide y by 100 to get quotient b and remainder c
- Divide b by 4 to get a quotient d and remainder e
- Divide 8*b+13 by 25 to get a quotient g. Ignore remainder
- Divide 19 * a + b d g + 15 by 30 to get remainder h. Ignore quotient
- Divide c by 4 to get quotient j and remainder k
- Divide a + 11 * h by 319 to get quotient m. Ignore remainder
- Divide 2 * e + 2 * j k + m + 32 by 7 to get remainder r. Ignore quotient
- Divide h m+r+90 by 25 to get quotient n. Ignore remainder
- Divide h- m + r+ n +19 by 32 to get remainder p. Ignore quotient
Then Easter falls on day p of month n. For example, if y is 2001,
A=6 b=20 c= 1 d=5 e=0 g=6 h =18 j=0 k=1 m=0 n=4 r =6 p=15. Therefore in 2001, Easter fell on April 15
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