mirror of
https://github.com/janunger/rheinwerk-video-training.git
synced 2026-02-06 07:05:14 +01:00
Initiale Version
This commit is contained in:
12
Kapitel_3/Lektion_7/1_fakultaet.php
Normal file
12
Kapitel_3/Lektion_7/1_fakultaet.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
function fakultaet($x)
|
||||
{
|
||||
if (0 == $x) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return $x * fakultaet($x - 1);
|
||||
}
|
||||
|
||||
echo fakultaet(3);
|
||||
Reference in New Issue
Block a user