write a java program to enter a year from the user and check whether it is leap year or not using if else statement
Answers
Answered by
0
Answer:
println("\n Please Enter any year you wish: "); year = sc. nextInt(); The first If condition will check whether the (year % 400) reminder is exactly equal to 0. As per the algorithm, any number that is divisible by 400 is a Leap year.
Answered by
1
Answer:
println("\n Please Enter any year you wish: "); year = sc. nextInt(); The first If condition will check whether the (year % 400) reminder is exactly equal to 0. As per the algorithm, any number that is divisible by 400 is a Leap year.
Similar questions