Answers for "program to calculate Fibonacci of 100 in C++"

C++
0

program to calculate Fibonacci of 100 in C++

#include <iostream>
#include <bigint/BigIntegerLibrary.hh>
using namespace std;

int main()
{
  BigInteger start = 0;
  BigInteger next = 1;
  BigInteger _new;
  
  for (int r = 1; r < 1000; r++)
  {
    _new = next + start;    
    start = next;
    next = _new;
  }
  
  cout << next << endl;
}
Posted by: Guest on August-28-2021

Code answers related to "program to calculate Fibonacci of 100 in C++"

Browse Popular Code Answers by Language