Leap year: Difference between revisions

no edit summary
imported>Andrade.fr.8
No edit summary
No edit summary
Line 3,813:
return rem(Y/4)=0;
];</syntaxhighlight>
 
=={{header|Yorick}}==
This solution is vectorized and can be applied to scalar or array input.
<syntaxhighlight lang="yaml">
!yamlscript/v0
 
defn main(year):
say: |
Is $year a leap year?
 
Answer: $leap-year(year)
 
defn leap-year(year):
if:
and:
zero?: (year % 4)
or:
pos?: (year % 100)
zero?: (year % 400)
=>: "Yes"
=>: "No"
</syntaxhighlight>
 
=={{header|Yorick}}==
55

edits