Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Leap-year/Chipmunk-Basic/leap-year.basic
Normal file
14
Task/Leap-year/Chipmunk-Basic/leap-year.basic
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue