Fortune Telling Collection - Fortune-telling birth date - Why do you dance every four years instead of a hundred years? How can you use a computer to calculate?
Why do you dance every four years instead of a hundred years? How can you use a computer to calculate?
(Tropical Year). The Gregorian calendar has an average of only 365 days a year, which is about 0.2422 days shorter than the tropical year.
Days, the remaining time of four years is about one day, so four years plus 1 day in February makes the calendar year of that year 366 days, and this year is a leap year. The current Gregorian calendar has 97 leap years every 400 years. According to every four years
In leap years, the average annual calculation will be 0.0078 days, so after 400 years, it will be about 3 days. So every 400 years, three leap years will be reduced. Therefore, the Gregorian calendar stipulates that when a year is 100, it must be
Leap year must be a multiple of 400; A year that is not a multiple of 400 or even a multiple of 4 is not a leap year.
This is what is usually said: jump in four years, not jump in a hundred years, and jump again in four hundred years. For example, 2000 is a leap year, and 2 100 is a normal year.
C language code:
if((year % 4 = = 0 & amp; & amp Year% 100! =0)|| (year% 400 = = 0)) a =1;
else a = 0;
If(a== 1) // Yes == No =, = indicates assignment = = indicates judgment.
Printf("\n%d This year is a leap year \n ",year);
Else printf("%d This year is not a leap year \n ",year);
//Instead of dividing, take the remainder, that is, calculate the remainder. If the remainder is 0, it means divisible.
- Previous article:Jokes about family relations
- Next article:Dreaming of the omen that your mobile phone sank to the bottom of the sea.
- Related articles
- I was born on 1988 at 6: 45 a.m. on the eleventh day of the first month. Can someone help me with my fortune telling? thank you
- What are the feng shui taboos for buying a house?
- I want to get a Zhong Kui tattooed on my arm. I have a scorpion tattooed on my arm. I want to report it. I wonder if I can tattoo Zhong Kui? Are there any taboos?
- Download the complete works of the duke of mount deer for free.
- Classical Chinese in Gu Hong
- Peak fortune teller _ Gao 'an fortune teller
- Cut off rotten peach blossoms
- Fortune-telling eye
- What is the sentence describing Chen in Uber Life?
- What does fortune-telling mean to pay off debts? Is there a master who can calculate?