#include<stdio.h>
int main()
{
int x=0,y=1,z,nth,i;
printf("\n\nPlease Enter The Term Number:");
scanf("%d",&nth);
for(i=1;i<=nth;i++)
{z=x+y;
x=y;
y=z;
}
printf("\nthe %dth term of Fibonacci Series is is %d\n\n\n",nth,z);
return 0;
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Thursday, January 27, 2011
Subscribe to:
Post Comments (Atom)
Great Work.. I saw One more easiest way to Write a C Program To Print Fibonacci Series
ReplyDelete