My Solutions
HOME
Microsoft
Exchange Server
▼
Exchange Server 2013
Linux
▼
Redhat Linux 7
Redhat Linux 6
Redhat Linux 5
Ms-Office
▼
Ms-Excel
MS-Excel 2013
Thursday, 23 July 2015
C Program - To print fibonacci series
C program to print fibonacci series
#include<stdio.h>
#include<conio.h>
void main()
{
int a=0,b=1,c=0,i;
clrscr();
for(i=0;i<10;i++)
{
printf(" %d",c);
a=b;
b=c;
c=a+b;
}
getch();
}
Output :-
0 1 1 2 3 5 8 13 21 34
Back to 'C Language Program'
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment