RosettaCodeData/Task/Factorial/PowerShell/factorial-1.ps1
2026-04-30 12:34:36 -04:00

6 lines
116 B
PowerShell

function Get-Factorial ($x) {
if ($x -eq 0) {
return 1
}
return $x * (Get-Factorial ($x - 1))
}