15 lines
333 B
Plaintext
15 lines
333 B
Plaintext
10 rem Leap year
|
|
20 for i% = 1 to 5
|
|
30 read year%
|
|
40 print year%;"is ";
|
|
50 if isleapyear(year%) = 0 then print "not "; else print "";
|
|
60 print "a leap year."
|
|
70 next i%
|
|
80 end
|
|
|
|
200 data 1900,1994,1996,1997,2000
|
|
|
|
400 sub isleapyear(y%)
|
|
410 isleapyear = ((y% mod 4 = 0) and (y% mod 100 <> 0)) or (y% mod 400 = 0)
|
|
420 end sub
|