title: Java leap year code problems
body: <pre><code>import java.util.Scanner;
  
  public class Hw2JamesVaughn  {
      public static void main(String[] args){
          Scanner input = new Scanner(System.in);        
          System.out.print("Enter a year: ");
          int year = input.nextInt();
          if((year &lt; 1582) == (year % 4==0))
              System.out.println(year + " is a leap year");
          else
              System.out.println(year + " is not a leap year");
  
          if((year &gt; 1582) == (year % 100 != 0) || (year % 400 == 0))
              System.out.println(year + " is a leap year");
          else
              System.out.println(year + " is not a leap year");
  
      }                
  }
  </code></pre>
  
  <p>This is the assignment.</p>
  
  <p>(To determine if a particular year is a leap year, use the following logic:</p>
  
  <ul>
  <li>the year must be divisible by 4</li>
  <li>starting from 1582, if the year is divisible by 100, it must also be divisible by 400
  Thus, the year 1700 is not a leap year, but 2000 is. However, 1500 is leap year since it was 
  before 1582, the adoption year of Gregorian calendar.
  Your program will ask for a year, and then display whether the year is leap year or not.)</li>
  </ul>
  
  <p>I have gotten this far with my java leap year program but its not working! Ive been working on this and i have no idea what is wrong.</p>