21 lines
506 B
Plaintext
21 lines
506 B
Plaintext
# year is a BASIC-256 keyword
|
|
function leapyear(year_)
|
|
if (year_ mod 4) <> 0 then return FALSE
|
|
if (year_ mod 100) = 0 and (year_ mod 400) <> 0 then return FALSE
|
|
return TRUE
|
|
end function
|
|
|
|
for year_ = 1800 to 2900 step 100
|
|
print year_;
|
|
if leapyear(year_) then print " is a leap year" else print " is not a leap year"
|
|
next year_
|
|
|
|
print
|
|
|
|
for year_ = 2012 to 2031
|
|
print year_;
|
|
if leapyear(year_) = TRUE then print " = leap "; else print " = no ";
|
|
if (year_ mod 4) = 3 then print ""
|
|
next year_
|
|
end
|