SampleExamples.com
All sample examples of Html, CSS, JavaScript, Java, C, CPP(C++), J2ME
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
Popular Posts
Java Function Code to create Reverse Linked List of Singly Linked List (In memory pointer changes)
Java Applet Animation Program for Moving Car
Applets vs Applications - How Applets Differ From Applications
Principles of Testing - Software Testing Principles
Java AWT vs SWING
C Program to Generate Analog Clock Using Graphics
Reverse a Number in PL/SQL Programming
C program to find transpose of a matrix
Multipath Inheritance in CPP
String Reverse Example in Java Programming
No comments:
Post a Comment
Dont SPAM