+ 1

Can anyone tell, this is the correct program for leap year. If there is any other algorithm for the leap year program tell me🙏.

https://code.sololearn.com/c2y8CbxpFxYW/?ref=app

26th Jan 2021, 7:48 PM
Harshit Gupta
Harshit Gupta - avatar
3 Antworten
+ 5
  There are more rules:   "1. Every year divisible by 4 is a leap year. (For example, 1996 was a leap year.)     2. Except that years divisible by 100 years are not leap years. (For example, 1900 was not a leap year.)     3. Except that years divisible by 400 years are leap years. (So 2000 will be a leap year after all.)" Source: https://www.uic.edu/depts/accc/software/isodates/leapyear.html I once calculated there should be a further extra leap year somewhere near the 10,000 year period, but nobody publishes that as an official rule.
26th Jan 2021, 7:55 PM
Brian
Brian - avatar
0
Thanku everyone for helping me.
27th Jan 2021, 3:24 AM
Harshit Gupta
Harshit Gupta - avatar