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
C Program For Fibonacci Series
Javascript program to find factorial of given number
C Program to check number is palindrome or not
Digital Clock in C Prgramming
Reverse a Number in PL/SQL Programming
String Reverse Example in Java Programming
C program for matrix multiplication of two matrix
Difference Between C and C++ Programming
C Program For Floyd's Triangle
Java Applet Animation Program for Moving Car
No comments:
Post a Comment
Dont SPAM