6 lines
116 B
PowerShell
6 lines
116 B
PowerShell
function Get-Factorial ($x) {
|
|
if ($x -eq 0) {
|
|
return 1
|
|
}
|
|
return $x * (Get-Factorial ($x - 1))
|
|
}
|