Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions