Program to generate the Fibonacci series | 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 | Learn C++ (Introduction and Tutorials to C++ Programming)
//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();
 }
Program to generate the Fibonacci series | Learn C++ (Introduction and Tutorials to C++ Programming) Program to generate the Fibonacci series | Learn C++ (Introduction and Tutorials to C++ Programming) Reviewed by SHERE KHOJRAHA on February 13, 2019 Rating: 5

No comments:

Powered by Blogger.