Numbers of the fibonacci sequence 0 1 1 2 3 5 8 13 21 34 55 89 44,... Are written in spiral form
Answers
Answered by
2
Answer:
n=int(input())
f=0
s=1
print(f)
print(s)
for i in range(2,n):
t=f+s
print(t)
f=s
s=t
Explanation:
Answered by
0
Answer:
int sum=0, n1=0, n2=1;
System.out.print(n1);
System.out.print(" "+ n2);
for (int i=0; i<=9; i++) {
sum = n1+n2;
System.out.print(" " +sum);
n1=n2;
n2=sum;
}
Explanation
Similar questions