Question: C- Write C++ statement to accomplish each of the following. 7. Declare variables sum and x to be of type int. 8. Set variable

C- Write C++ statement to accomplish each of the following. 7. Declare variables sum and x to be of type int. 8. Set variable x to 1. Set variable sum to 0. 9. Add variable x to variable sum and assign the result to variable sum. 10. Print "The sum is: " followed by the value of variable sum.
Step by Step Solution
3.58 Rating (162 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
