当前位置:网站首页>Why is 1900 not a leap year

Why is 1900 not a leap year

2022-07-05 08:05:00 Car chezi

origin

See a paragraph C++ The program , To introduce logical operators , Let's judge whether a year is a leap year .

 Please add a picture description

In short , If the end of a year is not 00, Then you can divide 4 It's a leap year ; If the end is 00, Then you can divide 400 It's a leap year .

I wondered , No 4 Is it a leap year ? since 1896 Year is a leap year , In another 4 Year is 1900 year ,1900 Why is it not a leap year ? In fact, this confusion occurred when I was in primary school .

principle

A year ( The earth revolves around the sun in a cycle ), Accurate to seconds ( Astronomical observation ) yes :

365 God 5 Hours 48 branch 45.5 second = 365.24219328703703703(703 The cycle of …) God

If 4 A leap in the year , The average year is :365+1/4=365.25 God

Every time 100 The year does not leap , The average year is :365+1/4-1/100 =365.24 God

Every time 400 A leap in the year :365+1/4-1/100+1/400 =365.2425 God

Every time 3200 The year does not leap :365+1/4-1/100+1/400-1/3200 =365.2421875 God

Every time 172800 Leap year :365+1/4-1/100+1/400-1/3200+1/172800 =365.24219328703703703(703 The cycle of …) God

Finally approaching the observation results , Therefore, there are various regulations for leap years , therefore 1900 Unfortunately, year was excluded from the status of leap year .

【End】

Reference material :https://www.zhihu.com/question/25388501/answer/433635665

原网站

版权声明
本文为[Car chezi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140546257839.html