Fibonacci series

a=0
b=1
for i in range (50):
c=a+b
a=b
b=c
if(c<50):
print(c,end=" ")

in this im getting 1 2 3 5 8 13 21 34 output, how can i get o/p as 1 1 2 3 5 8 13 21 34

1 Like

Hiii @kinnukeshiya ,
Just write your print statement below the line c = a+b, you will get the desired output.

1 Like