mirror of
https://github.com/janunger/rheinwerk-video-training.git
synced 2024-12-22 04:33:42 +01:00
12 lines
132 B
PHP
12 lines
132 B
PHP
<?php
|
|
|
|
function fakultaet($x)
|
|
{
|
|
if (0 == $x) {
|
|
return 1;
|
|
}
|
|
|
|
return $x * fakultaet($x - 1);
|
|
}
|
|
|
|
echo fakultaet(3); |