Leap year: Difference between revisions

Add BCPL
(Add Draco)
(Add BCPL)
Line 829:
Press any key to continue . . .</pre>
 
 
=={{header|BCPL}}==
<lang bcpl>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")
$)</lang>
{{out}}
<pre>1899 is not a leap year.
1900 is not a leap year.
1901 is not a leap year.
1902 is not a leap year.
1903 is not a leap year.
1904 is a leap year.
1905 is not a leap year.
1999 is not a leap year.
2000 is a leap year.
2001 is not a leap year.
2002 is not a leap year.
2003 is not a leap year.
2004 is a leap year.
2021 is not a leap year.
2022 is not a leap year.</pre>
 
=={{header|Befunge}}==
2,114

edits