Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Leap-year/Dc/leap-year.dc
Normal file
24
Task/Leap-year/Dc/leap-year.dc
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[0q]s0
|
||||
[1q]s1
|
||||
|
||||
[ S. [ l. 4% 0!=0 ## if y % 4: return 0
|
||||
l. 100% 0!=1 ## if y % 100: return 1
|
||||
l. 400% 0!=0 ## if y % 400: return 0
|
||||
1 ## return 1
|
||||
]x s.L.
|
||||
]sL ## L = isleapYear()
|
||||
|
||||
[ Sy
|
||||
lyn [ is ]P
|
||||
ly lLx
|
||||
[not ] 0:y
|
||||
[ ] 1:y
|
||||
;yP
|
||||
[a leap year]P AP
|
||||
OsyLyo
|
||||
]sT ## T = testYear()
|
||||
|
||||
1988 lTx
|
||||
1989 lTx
|
||||
1900 lTx
|
||||
2000 lTx
|
||||
Loading…
Add table
Add a link
Reference in a new issue