1.

What is wrong in my code: class math { public static void main(int y) { if(y % 4 == 0 || y % 400 == 0 && ! y % 100 == 0) { system.out.println("the year is a leap year"); } else { system.out.println(" the year is not a leap year"); } } }

Answer» TRY this:- if(((y%4==0) && (y%100!=0)) || (y%400==0))


Discussion

No Comment Found