+ 1
I just want it to print upto fibonacci series up 150 help me
This is printing one step ahead and got break Somebody help me. https://code.sololearn.com/w29OV1a7IeVi/?ref=app
5 Réponses
+ 2
Because of using do while, it stops only when $c<150,
144<150 so it repeat one more time, 233<150 false then stops.
Use while loop, instead of do while...
+ 1
OK. Sry, Same for both loops.
Write like this..
while($a+$b<150) in any loop..
Since $a+$b is the next value you going to print...
0
Thank you Jayakrishna
But still.got stuck
When i use while the same thing happen again
0
Ohh i was just confusing my self for nothing.
Thank you Jayakrishna i got the point.
0
You're Wel come sibu dhital