Add list-fibonacci.ps1

This commit is contained in:
Markus Fleschutz 2022-09-02 19:34:22 +02:00
parent f9e7237647
commit c6d500eeb6

View File

@ -0,0 +1,10 @@
function fibonacci($n) {
if ($n -lt 2) { return 1 }
return (fibonacci($n - 1)) + (fibonacci($n - 2))
}
foreach ($i in 0..100) {
Write-Host "$(fibonacci $i), " -noNewline
}
exit 0 # success