the output of this is just th same number, why wouldnt it be the total of all the numbers that make it up?
Code:
#include <iostream>
using namespace std;
int main () {
int num;
cout << "input a number" << endl;
cin >> num;
cout << endl;
while (num < 0 )
{
num1= num;
num = num + num;
num--;
}
cout << num;
return 0;
}