- Program must perform the following;
- Use cin, cout, and endl without std:: prefix
- Variables declared as num1, num2, num3, and average as type int
- Variables initialized as follows; 115 = num1, 29 = num2, -15=num3.
- One statement which initializes variable average with the average of num1, num2, and num3
- Statement(s) that output the values of all variables
- Program must compile and run
Num1 should equal 115, num2 should equal 29, num3 should equal -15, and average should be the total of all num variables defined, summed and divided by the total number of num variables (3). Return to end main function should be 0.
Output should be in the form of whole integers. average variable should be a single integer, a result of the sum of all three num variables divided by the total number of num variables.- Initialize standard inclusion statement to allow input/output and compiling via
- Declare the namespace std to allow use of cin, cout, and endl
- Declare main function
- Within main function declare variables num1/num2/num3/average
- Assign variable values based on parameters; num1=115, num2=29 num3=-15 and average=all num variables summed then divided by three (using precedence via parenthetical around addition): (num1 + num2 + num3) / 3
- Print each variable individually
- Insert a pause to allow verification of final values of all variables
- return statement to end main function
If downloading from GitHub user must pull the entirety of the folder contents, not just the .sln (needs the .cpp file included).User may open the executable or run the solution in Visual Studio via Debugger (F5). No input from the user is required, when finished press any input key to exit the program.