RosettaCodeData/Task/Greatest-common-divisor/PowerShell/greatest-common-divisor-2.ps1
2026-04-30 12:34:36 -04:00

3 lines
81 B
PowerShell

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