Find the last Sunday of each month: Difference between revisions
Find the last Sunday of each month (view source)
Revision as of 01:41, 22 February 2021
, 3 years ago→{{header|QuickBASIC}}
Line 3,487:
</lang>
=={{header|QuickBASIC 4.5}}==
QuickBASIC 4.5 doesn't have a way to manage dates easily. Following you'll see my solution for this task in QuickBASIC/QBASIC
<lang QBASIC>
' PROGRAM Last Sundays in Quick BASIC 4.5 (LASTSQB1)
' This program will calculate the last Sundays of each month in a given year.
' It works assigning the year in the command prompt
' Usage: LASTSQB1 Year
' In the IDE, be sure to assign the COMMAND$ value in the Run menu.
' Var
DIM iWY AS INTEGER
Line 3,608 ⟶ 3,614:
END FUNCTION
</lang>
{{out}}
<pre>
C:\>LASTSQB1 2013
Last Sundays of each month on year: 2013
2013-01-27
2013-02-24
2013-03-31
2013-04-28
2013-05-26
2013-06-30
2013-07-28
2013-08-25
2013-09-29
2013-10-27
2013-11-24
2013-12-29
</pre>
=={{header|R}}==
|