diff --git a/solutions/tcl/leap/1/leap.tcl b/solutions/tcl/leap/1/leap.tcl new file mode 100644 index 0000000..037ff1e --- /dev/null +++ b/solutions/tcl/leap/1/leap.tcl @@ -0,0 +1,9 @@ +#!/usr/bin/env tclsh + +proc isLeapYear {year} { + if {($year % 4 == 0 && $year % 100 != 0) || ($year % 100 == 0 && $year % 400 == 0)} { + return 1 + } else { + return 0 + } +}