RosettaCodeData/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.psh
2015-11-18 06:14:39 +00:00

3 lines
81 B
Text

function Get-GCD ($x, $y) {
if ($y -eq 0) { $x } else { Get-GCD $y ($x%$y) }
}