Question: If you enter 1 2 3 , when you run this program, what will be the output? #include using namespace std; int main ( )

If you enter 123, when you run this program, what will be the output?
#include
using namespace std;
int main()
{
// Prompt the user to enter three numbers
double number1, number2, number3;
cout << "Enter three numbers: ";
cin >> number1>> number2>> number3;
// Compute average
double average =(number1+ number2+ number3)/3;
// Display result
cout << average << endl;
return 0;
}
A.1
B.2
C.3
D.4

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 Programming Questions!