When I run my program it prints out the number for the forty eighth sequence as being -132375223 when it should read 4807526976. What am I doing wrong?
-Towey
# include <iostream>
using namespace std;
int main ()
{
int x1=0;
int x2=1;
int fib;
for (int i = 3; i <= 48; i++){
fib = x1 + x2;
x1 = x2;
x2 = fib;
}
cout << fib << endl;
return 0;
}