Answer:
The program written in Java without comment is as follows
import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.print("Year: ");
int y = input.nextInt();
int a = y%19;
System.out.println("a = "+a);
int b = y / 100;
System.out.println("b = "+b);
int c = y%100;
System.out.println("c = "+c);
int d = b / 4;
System.out.println("d = "+d);
int e = b%4;
System.out.println("e = "+e);
int g = (8 * b + 13)/25;
System.out.println("g = "+g);
int h = (19 * a + b - d - g + 15)%30;
System.out.println("h = "+h);
int j = c/4;
System.out.println("j = "+j);
int k = c%4;
System.out.println("k = "+k);
int m = (a + 11 * h)/319;
System.out.println("m = "+m);
int r = (2 * e + 2 * j - k - h + m + 32)%7;
System.out.println("r = "+r);
int n = (h - m + r + 90)/25;
System.out.println("n = "+n);
int p = (h - m + r + n + 19)%32;
System.out.println("p = "+p);
}
}
Explanation:
<em>I've added the full source code as an attachment where I use comments to explain difficult lines</em>