SampleExamples.com
Code Examples Made Simple
Saturday, December 24, 2011
C Program to Generate Fibonacci Series
It is a sample c program to generate a Fibonacci series.
Program Source Code
#include"stdio.h"
#include"conio.h"
void main()
{
int a , b , c , i=1;
clrscr();
a=0;
b=1;
printf(“Fibonacci Series”);
printf(“%d\n”, a);
printf(“%d\n”, b);
while(i<=10)
{
c=a+b;
printf(“%d”, c);
a=b;
b=c;
i++;
}
getch();
}
Output
No comments:
Post a Comment
Dont SPAM
Newer Post
Older Post
Home
View mobile version
Popular Posts
How to Format a Date in JavaScript
PL/SQL program to generate Fibonacci series
C Program to Generate Analog Clock Using Graphics
Java Function Code to create Reverse Linked List of Singly Linked List (In memory pointer changes)
C Program For Floyd's Triangle
What is Dofollow and Nofollow Links?
PL/SQL Example to find average of three numbers
C Program For Fibonacci Series
Basic LOOP Program in PL/SQL
C program to find the sum of two matrix
No comments:
Post a Comment
Dont SPAM