Day of the week: Difference between revisions
→{{header|GW-BASIC}}: Used features of GW-BASIC to simplify expressions. Added output.
(Dialects of BASIC moved to the BASIC section.) |
(→{{header|GW-BASIC}}: Used features of GW-BASIC to simplify expressions. Added output.) |
||
Line 822:
==={{header|GW-BASIC}}===
<syntaxhighlight lang="gwbasic">10
20 DEFINT D,
30
40 FOR Y = 2007 TO 2122
70
80 PRINT
90 END
190 REM Sunday = 0, Saturday = 6
140 Z = Y + INT(Y/4) - INT(Y/100) + INT(Y/400)▼
160 Z = Z MOD 7▼
220 Z = Z + D + (153 * M + 8) \ 5
170 RETURN</syntaxhighlight>▼
{{out}}
<pre>
2011 2016 2022 2033 2039 2044 2050 2061 2067 2072 2078 2089 2095 2101 2107 2112 2118
</pre>
==={{header|IS-BASIC}}===
|