title: Calculate the date of Easter Sunday
body: <p>Write a program to compute the date of Easter Sunday. Easter Sunday is the first Sunday after the first full moon of spring.
  Use the algorithm invented by the mathematician Carl Friedrich Gauss in 1800:</p>
  
  <ol>
  <li>Let <code>y</code> be the year (such as 1800 or 2001)</li>
  <li>Divide <code>y</code> by <code>19</code> and call the remainder <code>a</code>.  Ignore the quotient.</li>
  <li>Divide <code>y</code> by <code>100</code> to get a quotient <code>b</code> and a remainder <code>c</code>.</li>
  <li>Divide <code>b</code> by <code>4</code> to get a quotient <code>d</code> and a remainder <code>e</code>.</li>
  <li>Divide <code>8 * b + 13</code> by <code>25</code> to get a quotient <code>g</code>.  Ignore the remainder.</li>
  <li>Divide <code>19 * a + b - d - g + 15</code> by <code>30</code> to get a remainder <code>h</code>.  Ignore
  the quotient.</li>
  <li>Divide <code>c</code> by <code>4</code> to get a quotient <code>j</code> and a remainder <code>k</code>.</li>
  <li>Divide <code>a + 11 * h</code> by <code>319</code> to get a quotient <code>m</code>.  Ignore the remainder.</li>
  <li>Divide <code>2 * e + 2 * j - k - h + m + 32</code> by <code>7</code> to get a remainder <code>r</code>. Ignore the quotient.</li>
  <li>Divide <code>h - m + r + 90</code> by <code>25</code> to get a quotient <code>n</code>.  Ignore the
  remainder.</li>
  <li>Divide <code>h - m + r + n + 19</code> by <code>32</code> to get a remainder of <code>p</code>.  Ignore the
  quotient.</li>
  </ol>
  
  <p>Then Easter falls on a day <code>p</code> of month <code>n</code>.</p>
  
  <p>For example, if y is 2001:</p>
  
  <pre class="lang-none prettyprint-override"><code>a = 6
  b = 20
  c = 1
  d = 5
  e = 0
  g = 6
  h = 18
  j = 0
  k = 1
  m = 0
  r = 6
  n = 4
  p = 15
  </code></pre>
  
  <p>Therefore, in 2001, Easter Sunday fell on April 15. </p>
  
  <p>Make sure you prompt the user for a year and have the user input the year.  Also, make sure you output the values of p and n with the appropriate messages describing the values output.</p>
  
  <hr>
  
  <p>I'm having a little trouble putting this into Java code. Here's what I've tried:</p>
  
  <pre><code>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());
      }
  }
  </code></pre>
  
  <p>This is what I have. I don't know how to assign stuff, like I tried to get <code>getEasterSundayMonth</code> to equal the value of <code>n</code>, pretty sure its not right. Where do I go from here?</p>