Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Long-year/Snobol/long-year.sno
Normal file
19
Task/Long-year/Snobol/long-year.sno
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
DEFINE('DEC31WD(Year)') :(END_DEC31WD)
|
||||
DEC31WD DEC31WD = REMDR(Year + (Year / 4) - (Year / 100) + (Year / 400), 7) :(RETURN)
|
||||
END_DEC31WD
|
||||
|
||||
DEFINE('ISOLONG(Year)') :(END_ISOLONG)
|
||||
ISOLONG EQ(DEC31WD(Year), 4) :S(RETURN)
|
||||
EQ(DEC31WD(Year - 1), 3) :S(RETURN)F(FRETURN)
|
||||
END_ISOLONG
|
||||
|
||||
DEFINE('ISODEMO(Start,End)') :(END_ISODEMO)
|
||||
ISODEMO OUTPUT = 'ISO long years between ' Start ' and ' End ':'
|
||||
Year = Start
|
||||
LOOP OUTPUT = ISOLONG(Year) Year
|
||||
Year = Year + 1
|
||||
LE(YEAR, 2045) :S(LOOP) F(RETURN)
|
||||
END_ISODEMO
|
||||
|
||||
ISODEMO(1995, 2045)
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue