RosettaCodeData/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.psh
2023-07-01 13:44:08 -04:00

3 lines
81 B
Text

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