Download presentation
Presentation is loading. Please wait.
1
Leap Years
2
What is a leap year? In most years, February has 28 days. Approximately every 4 years, February has 29 days. The years in which February has 29 days are called leap years.
3
What is a “century” year?
A “century” year is any year that is evenly divisible by 100 Examples 1800, 1900, 2000, etc. are evenly divisible by 100 so they are “century” years
4
How can you know if a year is a leap year?
The rules to determine if a specific year is a leap year or not depend on : whether the year is a century year or a non-century year.
5
“Century” Years A century is a leap year if it is divisible by 400
Examples: The year 1800 is NOT a leap year since it is NOT evenly divisible by / 400 = 4.5 The year 2000 IS a leap year since it IS evenly divisible by / 400 = 5
6
Non-Century Years A non-century year is a leap year if it is evenly divisible by 4 Examples: The year 1995 is NOT a leap year since it is NOT evenly divisible by / 4 = The year 1996 IS a leap year since it IS evenly divisible by / 4 = 499
7
Using the IF statement
8
How to determine if it is a century year?
If year Mod 100 = 0 Then ‘century year Else ‘ non-centry year End If
9
How do you determine if a year is leap year
If year Mod 100 = 0 Then ‘century year If year Mod 400 = 0 ‘ leap year End If Else ‘ non-centry year If year Mod 4 = 0 ‘ leap year End If End If
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.