Starting with the Count.j example, implement Butcher\'s Easter Algorithm to calc
ID: 3885021 • Letter: S
Question
Starting with the Count.j example, implement Butcher's Easter Algorithm to calculate and print the date of Easter for the next 10 years in JVM assembly language.
THIS NEEDS TO BE ASSEMBLED WITH JASMIN. its a .jfile not a .java file NOT JASMINE, IF YOU DON'T KNOW DON'T ANSWER IVE POSTED TOO MANY TIMES PLEASE HELP!
Butcher's Easter Algorithm
Butcher's Algorithm to calculate Easter day for any year
in the Gregorian Calendar.
All values and calculations are integer only.
For a given year:
a=year%19
b=year/100
c=year%100
d=b/4
e=b%4
f=(b+8)/25
g=(b-f+1)/3
h=(19*a+b-d-g+15)%30
i=c/4
k=c%4
x=(32+2*e+2*i-h-k)%7
m=(a+11*h+22*x)/451
Easter Month =(h+x-7*m+114)/31 [3=March, 4=April]
p=(h+x-7*m+114)%31
Easter Date=p+1 (date in Easter Month
Expert Answer
Explanation / Answer
import java.util.Scanner; public class Easter { public static void main(String[] args) { Scanner input = new Scanner(System.in); int y = 2014; int a = y % 19; int b = y / 100; int c = y % 100; int d = b / 4; int e = b % 4; int g = (8 * b + 13) / 25; int h = (19 * a + b - d - g + 15) % 30; int j = c / 4; int k = c % 4; int m = (a + 11 * h) / 319; int r = (2 * e + 2 * j - k - h + m + 32) % 7; int n = (h - m + r + 90) / 25; int p = (h - m + r + n + 19) % 32; getEasterSundayMonth = n; System.out.println("Month: " + Easter.getEasterSundayMonth()); } }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.