Talk:Leap year: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) m (→REXX Version 4) |
Walterpachl (talk | contribs) m (→REXX Version 4: remove my incorrect claim!) |
||
Line 12: | Line 12: | ||
== REXX Version 4 == |
== REXX Version 4 == |
||
⚫ | |||
Better: |
|||
Years with 2 digits are padded with the current century |
|||
⚫ | |||
Years with fewer than 4 digits are padded to the left with zeroes. |
|||
<br> |
<br> |
||
<lang rexx> |
|||
<br> '''I think this sentence and the claim below is wrong- Program should only support yy and yyyy''' |
|||
ok=0 |
|||
<br> |
|||
Do y=0 To 999 |
|||
⚫ | |||
If leapyear(y)==leapyear(right(y,4,0)) Then ok=ok+1 |
|||
<br> |
|||
else Say y leapyear(y) leapyear(right(y,4,0)) |
|||
leapyear: procedure; parse arg y /*year could be: Y, YY, YYY, YYYY*/ |
|||
End |
|||
Say </lang> |
|||
shows 1000 |
|||
<br>Somehow I was mislead:-( |
|||
⚫ |