Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LeapYear
- {
- public static void main(int year)
- {
- if(((year % 100 == 0) && (year % 400 == 0)) ||
- ((year % 100 != 0) && (year % 4 == 0)))
- {
- System.out.println("It's a Leap Year!");
- }
- else
- {
- System.out.println("It's not a Leap Year!");
- }
- }
- }
Add Comment
Please, Sign In to add comment