program to calculate fibonacci of 100 in c 2b 2b

Solutions on MaxInterview for program to calculate fibonacci of 100 in c 2b 2b by the best coders in the world

showing results for - "program to calculate fibonacci of 100 in c 2b 2b"
Benjamin
17 Apr 2020
1#include <iostream>
2#include <bigint/BigIntegerLibrary.hh>
3using namespace std;
4
5int main()
6{
7  BigInteger start = 0;
8  BigInteger next = 1;
9  BigInteger _new;
10  
11  for (int r = 1; r < 1000; r++)
12  {
13    _new = next + start;    
14    start = next;
15    next = _new;
16  }
17  
18  cout << next << endl;
19}
similar questions