thespeedracer38

LeapYear

Jan 12th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. class LeapYear
  2. {
  3.     public static void main(int year)
  4.     {
  5.         if(((year % 100 == 0) && (year % 400 == 0)) ||
  6.             ((year % 100 != 0) && (year % 4 == 0)))
  7.         {
  8.             System.out.println("It's a Leap Year!");
  9.         }
  10.         else
  11.         {
  12.             System.out.println("It's not a Leap Year!");
  13.         }
  14.     }
  15. }
Add Comment
Please, Sign In to add comment