Long year: Difference between revisions

Long year en Yabasic
(Long year en BASIC256)
(Long year en Yabasic)
Line 2,217:
[2105, 2111, 2116, 2122, 2128, 2133, 2139, 2144, 2150, 2156, 2161, 2167, 2172, 2178, 2184, 2189, 2195]
</pre>
 
 
=={{header|Yabasic}}==
{{trans|BASIC256}}
<lang yabasic>sub p(y)
return mod((y + int(y/4) - int(y/100) + int(y/400)), 7)
end sub
 
sub isLongYear(y)
return (p(y) = 4) or (p(y - 1) = 3)
end sub
 
for y = 2000 to 2100
if isLongYear(y) then print y : fi
next y
end</lang>
{{out}}
<pre>
Igual que la entrada de BASIC256.
</pre>
 
 
=={{header|zkl}}==
2,130

edits