Computer Science, asked by NidhiTamang, 3 months ago

write a program to display in fabonicc series:
0 1 1 2 5 8 up to nth term ​

Answers

Answered by niharikagurjar2005
3

 Answer

Fibonacci Series in C without recursion

  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n1=0,n2=1,n3,i,number;
  5. printf("Enter the number of elements:");
  6. scanf("%d",&number);
  7. printf("\n%d %d",n1,n2);//printing 0 and 1.
  8. for(i=2;i<number;++i)//loop starts from 2 because 0 and 1 are already printed.

Answered by kamalrajatjoshi94
3

Answer:

View the attachment.

Just do one modification in place of n write something else and in place of while(n<=10); write variable p.

Hope you understand.

Attachments:
Similar questions