0

Help me fix this problem.

//Fibonacci Series Output - 0,1,1,2,3,5,8,13 $n=5; $a=[0,1]; for($i=0; $i<=$n; $i++){ //Write your code here in only 1 line $a[] = $a[count($a) - 1] + $a[count($a) - 2]; } echo implode($a,','); ?>

2nd Aug 2022, 5:35 PM
Karan Davande
Karan Davande - avatar
1 ответ
0
Why you declare $n=5? You want iterate in for to 13.
4th Aug 2022, 8:41 PM
Václav Dostál
Václav Dostál - avatar
Актуальное сегодня
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes