Completely Solved C, C++ Programs Assignment.




C Program to print fibonacci series .

Filed Under:

Problem 15: C Program to print fibonacci series .
#include<stdio.h>
#include<conio.h>
main( )
{
int a=0,b=1,c=0,i;
clrscr( );
printf(“%d”,a);
printf(“n%d”,b);
for (i=1; i<=10; i++)
{
c=a+b;
printf(“n%d”,c);
a=b;
b=c;
}
getch( );
}
C compiler: gcc 4.1.2

Back to main directory: Sample C Program | Software Practical | Solved C Assignment


Get Free Programming Tutorials and Solved assignments