Program to generate the Fibonacci series

Tuesday, August 11, 2020

Learn C++ (Introduction and Tutorials to C++ Programming)

C++ is a general-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation.

//Program to generate the Fibonacci series

#include<iostream.h>

#include<conio.h>

 void main()

 {clrscr();

 int x=0,y=1,z,n,i=3;

 cout<<"\n Enter The Number Of Term :";

 cin>>n;

 cout<<x<<" "<<y<<" ";

 do

 {z=x+y;

 cout<<z<<" ";

 x=y;

 i++;

 }while(i<=n);

 getch();

 }

You Might Also Like

0 Comments

Like us on Facebook

Flickr Images

Flickr Short Films