exercism/zig/leap/leap.zig

13 lines
253 B
Zig
Raw Normal View History

pub fn isLeapYear(year: u32) bool {
if (year % 4 == 0) {
if (year % 100 == 0) {
if (year % 400 == 0) {
return true;
}
return false;
}
return true;
}
return false;
}