This is an error 404
There are `0` results
preferences:
143.05 ms | 1399 KiB | 7 Q<?hh
function fibonacci($n){
/*
* Notice that in PHP, we do not have to declare our variables, nor must we
* declare their types. Also see how variables in PHP are prefaced with the
* dollar sign. Other than that, this is identical to the C version of this function.
*/
$a = 0;
$b = 1;
for ($i = 0; $i < $n; $i++){
printf("%d\n",$a);
$sum = $a+$b;
$a = $b;
$b = $sum;
}
}
fibonacci(10);