Talk:Leap year: Difference between revisions
m
→REXX Version 4: remove my incorrect claim!
Walterpachl (talk | contribs) m (→REXX Version 4) |
Walterpachl (talk | contribs) m (→REXX Version 4: remove my incorrect claim!) |
||
Line 12:
== REXX Version 4 ==
Actually This seems to be not necessary:<br><br>If a year below 100 is to be used, the year should have leading zeroes added (to make it four digits).▼
Better:
Years with 2 digits are padded with the current century
▲<br><br>If a year below 100 is to be used, the year should have leading zeroes added (to make it four digits).
Years with fewer than 4 digits are padded to the left with zeroes.
<br>
<lang rexx>
ok=0
Do y=0 To 999
--Walter Pachl 08:17, 17 April 2021 (UTC)▼
If leapyear(y)==leapyear(right(y,4,0)) Then ok=ok+1
else Say y leapyear(y) leapyear(right(y,4,0))
End
Say </lang>
shows 1000
<br>Somehow I was mislead:-(
|