Quick actions

cmd+k|ctrl+k

Navigation

Languages

GCD

Snippet info

Language

Fsharp

Visibility

public

Author

orionblastar

Created

2015-07-26T21:41:13Z

Updated

2015-07-26T21:41:13Z

open System

let rec gcd x y =
    if y = 0 then x
    else gcd y (x % y)
    
Console.WriteLine(gcd 259 111) // prints 37
INFO