Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Leap-year/BCPL/leap-year.bcpl
Normal file
11
Task/Leap-year/BCPL/leap-year.bcpl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
get "libhdr"
|
||||
|
||||
let leap(year) = year rem 400 = 0 | (year rem 4 = 0 & year rem 100 ~= 0)
|
||||
|
||||
let start() be
|
||||
$( let years = table 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2021, 2022
|
||||
for i = 0 to 14 do
|
||||
writef("%N %S a leap year.*N",
|
||||
years!i, leap(years!i) -> "is", "is not")
|
||||
$)
|
||||
Loading…
Add table
Add a link
Reference in a new issue