This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let euler19 () = | |
let mutable k = 0 | |
for y in 1901 .. 2000 do | |
for m in 1 .. 12 do | |
let date = System.DateTime(y, m, 1) | |
if date.DayOfWeek = System.DayOfWeek.Sunday then | |
k <- k + 1 | |
k | |
stdout.WriteLine(euler19 ()) |