Question: Check the following code and answer the question, does the code run without build errors? Select all answers that apply. #include using namespace std; /

Check the following code and answer the question, does the code run without build errors? Select all answers that apply.
#include
using namespace std; // preprocessing directive(s)
int main()
{
double num1, num2, num3, avg;
cout << "Enter the first number; ";
cin >> num1;
cout << "Enter the second number; ";
cin >> num2;
cout << "Enter the third number; ";
cin >> num3;
avg = num1+ num2+ num3/3;
cout << "The average is "<< avg << endl;
return 0;
}
Select 2 correct answer(s)
Question 3 options:
No, it doesn't run and has build errors.
It runs without build errors and computes the average correctly.
Yes, it runs without build errors
It runs without build errors but computes the average incorrectly

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!