Long year: Difference between revisions
Content added Content deleted
(→{{header|Palo Alto Tiny BASIC}}: Added a solution.) |
Not a robot (talk | contribs) (Add Draco) |
||
Line 1,346: | Line 1,346: | ||
end. |
end. |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|Draco}}== |
|||
<syntaxhighlight lang="draco">proc p(word y) word: |
|||
(y + y/4 - y/100 + y/400) % 7 |
|||
corp |
|||
proc longyear(word y) bool: |
|||
p(y) = 4 or p(y-1) = 3 |
|||
corp |
|||
proc main() void: |
|||
word y; |
|||
for y from 2000 upto 2100 do |
|||
if longyear(y) then writeln(y) fi |
|||
od |
|||
corp</syntaxhighlight> |
|||
{{out}} |
|||
<pre>2004 |
|||
2009 |
|||
2015 |
|||
2020 |
|||
2026 |
|||
2032 |
|||
2037 |
|||
2043 |
|||
2048 |
|||
2054 |
|||
2060 |
|||
2065 |
|||
2071 |
|||
2076 |
|||
2082 |
|||
2088 |
|||
2093 |
|||
2099</pre> |
|||
=={{header|Elixir}}== |
=={{header|Elixir}}== |