WHAT IS THE REASON THIS IS HAPPENNING!!!!
I was making a code to generate the fibbonachi number sequence, can somebody tell me whats wrong with my code, it works alright but then it randomly throws in a negative number -1323752223 Can you try In the Playground and see what's wrong with it!! Here it is: #include <iostream> using namespace std; int main() { int a=0,b=1,c; //declare Neccessary variables cout<<a<<endl; //Starting # 0 cout<<b<<endl; //Starting # 1 while(1){ c=a+b; // set c equal to sum of a and b (1+0=1) cout<<c<<endl; //print out sum(1) a=b; //set a equal to b in order to move on (a now = 1) b=c; //set b equal to the sum (c) to move on (b now = 1) // now repeat to get new sum (c) value } return 0; }