Sunday, October 30, 2011
Find fibonacci number (Program)
Write a proaram for Find fibonacci number.
# include<stdio.h>
int main()
{
int n,i,f0=0,f1=1,f;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
f=f0+f1;
printf("%4d",f0);
f1=f0;
f0=f;
}
return 0;
}
From: Me
No comments:
Post a Comment
Comment of this content!
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Comment of this content!