RosettaCodeData/Task/Factorial/PowerShell/factorial-1.psh
2023-07-01 13:44:08 -04:00

6 lines
116 B
Text

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