What will be the output of the following code fragment ?
if (year %100 == 0)
if (year % 400 == 0)
System.out.println ("LEAP");
else
System.out.println (“Not century year");
No spam
Answers
Answered by
2
Answer:
if you give input a year which is leap due to above conditions of if it will print LEAP
otherwise the second statement
Similar questions