Answer:
Change line 10 to:
userNumSquared = userNum * userNum;
Change line 11 to:
cout << userNumSquared<<endl;
Step-by-step explanation:
Though the question is a bit lengthy but the requirements are not clearly stated. However, I'm able to pick up the following points.
- Print the square of the inputted number
- Print the squared number with a new line
To do this, we simply modify the affected lines which are lines 10 and 11.
The plus sign on line 10 will be modified to multiplication
i.e.
userNumSquared = userNum * userNum;
And line 11 will be modified to:
cout << userNumSquared<<endl;
Every other line of the program is okay and do not need to be modified