0) { printf("the fibanocci series is%d",c); a=b; b=c; c=a+b; n--; } }">
GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Aztec Systems  >  C

 Print  |  
Question:  Write a program to implement the Fibonacci series



September 09, 2009 08:54:06 #6
 vigneshwaransankaran   Member Since: September 2009    Total Comments: 3 

RE: Write a program to implement the Fibonacci series
 

#include

main()

{

int a,b,c,n;

a=0;

b=0;

c=1;

printf("enter the value of n");

scanf("%d",&n);

while(n>0)

{

printf("the fibanocci series is%d",c);

a=b;

b=c;

c=a+b;

n--;

}

}

     

 

Back To Question