Powered By Blogger

Monday, May 4, 2009

C Programming

#include
#include
void main()
{
int a,i; long int p,q,d,sum=2;
clrscr();
printf("How many fibonaci element you want: ");
scanf("%d",&a);
p=1;q=1;
printf("\nFibonaci serrise with %d element :",a);
printf("%ld %ld ",p,q);
for(i=2;i
{
d=p+q;
p=q;
q=d;
printf("%ld ",d);
sum=sum+d;
}
printf("\n\nThe summation of fibonaciseries up to %d term=%d",a,sum);
getch();
}

0 comments:

About This Blog

This is an important blog about updated news about computer science and technology.

Blog Archive

Visitors

  © Free Blogger Templates Blogger Theme II by Ourblogtemplates.com 2008

Back to TOP