Anyone can know how to know this is leap year or not | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Anyone can know how to know this is leap year or not

7th Oct 2016, 11:29 AM
susmitha gummadi
susmitha gummadi - avatar
2 Answers
+ 1
if (year%400==0) leap else if (year%100==0) not leap else if (year%4==0) leap else not leap years multiple of 4 are leap BUT those multiple of 100 (centuries) are not leap BUT those multiple of 400 are again leap.
7th Oct 2016, 3:58 PM
marcram
0
Hi The year 2000 was a leap year . Also we can add 4 to a leap year to find the next one.So I think the years in Gregorian calendar which are divisible by 4 , are leap years.
7th Oct 2016, 3:17 PM
etinavid
etinavid - avatar