0

What is the condition to find leap year

20th Jan 2017, 7:56 PM
Pragati Porwal
Pragati Porwal - avatar
2 Réponses
+ 1
Java method, just translate it to C# private boolean isLeapYear(int year){ if (year % 4 == 0){ if (year % 100 == 0) if (year % 400 == 0) return true; else return false; else return true; }else { return false; } }
20th Jan 2017, 8:02 PM
Uran Kajtazaj
Uran Kajtazaj - avatar
0
For the c# equivalent; public static bool IsLeapYear( int year )
20th Jan 2017, 9:29 PM
Aaron
Aaron - avatar