This function will determine if a given year is a leap-year.
(year: u64)
| 71 | |
| 72 | // This function will determine if a given year is a leap-year. |
| 73 | fn leapyr(year: u64) -> bool |
| 74 | { |
| 75 | if year % 4 != 0 |
| 76 | { |
| 77 | false |
| 78 | } |
| 79 | else if year % 100 != 0 |
| 80 | { |
| 81 | true |
| 82 | } |
| 83 | else if year % 400 != 0 |
| 84 | { |
| 85 | false |
| 86 | } |
| 87 | else |
| 88 | { |
| 89 | true |
| 90 | } |
| 91 | } |
no outgoing calls
no test coverage detected