
Keith B. answered 09/22/19
Software Engineer and Math Geek
In C/C++, statements take on a value, which let's you chain operations. This allows for code like this:
int x,y;
x = y = 7;
The operation takes place from right to left, so y is assigned first, then x. The statement of y = 7 takes on the value of 7, which is then assigned to x.
Given this, your assignment gets easy:
cout << "Enter your number: ";
int value;
cin >> value;
cout << "Adding 10: " << (value += 10) << endl;
Just fill in the rest of the requirements.