This is the solution of the problem in python: N=int(input())a=0b=1print(a,end=" ")print(b,end=" ")count=2while(1): c=a+b count+=1 if(count==N): print(c) break else: print(c,end=" ") a=b b=c
No comments