Exercism Rust – 3 – Leap Year

simple bool conditions:


pub fn is_leap_year(year: i32) -> bool {
(year % 4) == 0 || (year % 100 == 0 && year % 400 == 0)
}

view raw

exercism-3.rs

hosted with ❤ by GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s