📅  最后修改于: 2022-03-11 14:49:01.091000             🧑  作者: Mango
let str = Console.ReadLine()
match int.TryParse str with
| true, num -> printfn "%i" num
| _ -> failwithf "'%s' is not an integer" str