Friday the 13th

Published by persolut in

Given the month and year as numbers, return whether that month contains a Friday 13th.

Examples

HasFriday13th(3, 2020) ➞ True

HasFriday13th(10, 2017) ➞ True

HasFriday13th(1, 1985) ➞ False

Notes

  • January will be given as 1, February as 2, etc ...
  • Check Resources for some helpful tutorials on C#'s Datetime struct.
Watch a quick demo on how Edabit works.