int main()
{// start
int x = 1, xx = 0;
while( x!=0)
{
cout<<"enter a number to add up"<<endl;
while( x!=0)
cin>>x;
xx = xx + x;
}
cout << xx;
return 0;
} //end
I am not getting a running total when adding these numbers - I thought xx = xx + x would give me the grand total, but it do not.
What do I have wrong!!!