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


Generate Fibonacci Series Output
Posted by Piyush Purbia at 11:38 AM
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: c example, c examples with code, c program, fibonacci series, generate fibonacci series, sample c example, sample c program

No comments:

Post a Comment

Dont SPAM

Newer Post Older Post Home

Popular Posts

  • Check Number is Armstrong in PL/SQL Programming
  • Generate Pascal Triangle in Java - Java Code for Pascal Triangle
  • 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
  • PL/SQL Example to find average of three numbers
  • Difference Between C++ and Java - Java Advantages over C++
  • Principles of Testing - Software Testing Principles
  • Java AWT vs SWING
  • C program for Binary Search

Facebook Page

Hey, If you have other program's and you want to publish here. Please write me at support @100india.com We will publish your shared example with your name as 'This example is Contribute by: Deepak Kumar'.

Popular Posts

  • Check Number is Armstrong in PL/SQL Programming
  • Generate Pascal Triangle in Java - Java Code for Pascal Triangle
  • Java Function Code to create Reverse Linked List of Singly Linked List (In memory pointer changes)

Blog Archive

  • ►  2015 (1)
    • ►  September (1)
  • ►  2012 (16)
    • ►  December (1)
    • ►  May (3)
    • ►  April (3)
    • ►  February (7)
    • ►  January (2)
  • ▼  2011 (40)
    • ▼  December (12)
      • C Program For Pascal's Triangle - Pattern Pascal's...
      • Fibonacci Series Program in Java Programming
      • Java is a Platform Independent Language
      • C Program to Print Patterns of Stars
      • C Program to Print Patterns of Numbers
      • Check Whether Given Number is Armstrong or Not in ...
      • C Program to Generate Fibonacci Series
      • Basic Java Program To Print Hello World
      • PL/SQL Sample Examples
      • C Program to String Reverse
      • Why C is Called Middle Level Language?
      • C program for Bubble Sort
    • ►  November (22)
    • ►  September (6)
  • ►  2010 (13)
    • ►  December (7)
    • ►  November (5)
    • ►  September (1)

Traffic Updates

SampleExamples.com. Simple theme. Powered by Blogger.