Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Sudan-function/PHP/sudan-function.php
Normal file
16
Task/Sudan-function/PHP/sudan-function.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#Aamrun , 11th July 2022
|
||||
|
||||
<?php
|
||||
function F(int $n,int $x,int $y) {
|
||||
if ($n == 0) {
|
||||
return $x + $y;
|
||||
}
|
||||
|
||||
else if ($y == 0) {
|
||||
return $x;
|
||||
}
|
||||
|
||||
return F($n - 1, F($n, $x, $y - 1), F($n, $x, $y - 1) + $y);
|
||||
}
|
||||
echo "F(1,3,3) = " . F(1,3,3);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue