about-text

SoftOSet is the most remarkable programming site. SoftOSet provides the fresh conceptual and professional programs, articles, books, and other interesting and technical writings. SoftOSet is the most reliable programming site to learn the programs and the basics of the popular programming languages. SoftOSet is the hub of the informative and research based articles.

                    Fibconi Series Program in C Plus Plus

 

Fibconi series program is the another important program in C++. Usually the C++ programs of fibconi series display the fibconi series on the screen.

We will today perform the same task we will write the code of C++ program which will print the fibconi series on the screen.


Fibconi Series

Before we continue to develop the program for fibconi series. Just know what the fibconi series exactly is?

Fibconi Series is a series of numbers in which each member is the sum of its preceding two members except the first two members of the series which are always 0 and 1.

 

Fibconi Series Program in C ++

Code

//sofotset.blogspot.com

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int limit=2147483647;

int next=0;

int last=1;

while(next<limit/2)

{

            cout<<last<<"  ";

int sum=next+last;   

next=last;

last=sum;

}

cout<<endl;

return 0;

}

 

 

Output of Fibconi Series Program

 

The code above when debugged and tested on the compiler IDE Dev C++ produce the following output.

 

 

 

Fibconi Series Program in C plus plus

 

 

 

 

Hence we have successfully print out the fibconi series up to the limit of the integer value.

Thank you for reading this page giving us your precious time.


Post a Comment

Feel Free to Comment Us

Previous Post Next Post

Recents