Find the last Sunday of each month: Difference between revisions
m
→{{header|S-Basic}}
Line 4,405:
$constant SUNDAY = 0
var m, y = integer
input "Display last Sundays in what year"; y
for m = 1 to 12
print shortmonth(m);" ";lastkday(SUNDAY, m,
next m
end</lang>
{{out}}
<pre>
Jan 21
Feb 28
|