Question: The program below is supposed to calculate and display the average of three integer numbers. The program compiles with no error, but does not give

The program below is supposed to calculate and display the average of three integer numbers. The program compiles with no error, but does not give the correct result. Write the corrected program. Make as few changes as possible. # include using namespace std; int main() { int num1, num2, num3, average; cout << "Enter number 1: "; cin >> num1; cout << "Enter number 2: "; cin >> num2; cout << "Enter number 3: "; cin >> num3; average = num1 + num2+ num3 /3; cout << "The average is " << "average" << endl; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!