Im trying to get this program to add the numbers to eachother after each gets executed, and 0 is suppose to terminate the program. Am I using the wrong loop? Anyone give me some tips please?
Code:
#include <iostream>
using namespace std;
int main()
{
cout << " Please enter a number";
int num;
cin >> num;
cin.get();
for (int i = num; i != 0; i++)
{
cout << " Number is now : " << i << endl;
i += i;
cin >> i;
cin.get();
};
cout << "Terminating Program now";
cin.get();
return 0;
}