Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

-Write a C++ statement that includes the header file iostream. -Write a C++ stat

ID: 3742197 • Letter: #

Question

-Write a C++ statement that includes the header file iostream.

-Write a C++ statement that allows you to use cin, cout, and endl without the prefix std::.

-Write C++ statement(s) that declare the following variables: num1, num2,num3, and average of type double.

-Write C++ statements that store 75.35 into num1, –35.56 into num2, and 15.76 into num3

-Write a C++ statement that stores the average of num1, num2, and num3 into average

-Final Step:

Write C++ statement(s) that output the values of num1, num2, num3, and average.

Then compile and run your program!

my code so far : helppp xd

#include <iostream>

using namespace std;

int main()

{

int double num1, num2, num3;

  

num1 = 75.35;

num2 = -35.56;

num3 = 15.76;

int double average = (num1 + num2 + num3) / 3;

cout << "Num 1 = " << num1 << endl;

cout << "Num 2 = " << num2 << endl;

cout << "Num 3 = " << num3 << endl;

cout << "Average = " << average << endl;

  

return 0;

}

Explanation / Answer

#include <iostream>
using namespace std;
int main()
{
double num1, num2, num3;

num1 = 75.35;
num2 = -35.56;
num3 = 15.76;
double average = (num1 + num2 + num3) / 3;
cout << "Num 1 = " << num1 << endl;
cout << "Num 2 = " << num2 << endl;
cout << "Num 3 = " << num3 << endl;
cout << "Average = " << average << endl;

return 0;
}

Output:

Num 1 = 75.35
Num 2 = -35.56
Num 3 = 15.76
Average = 18.5167

Do ask if any doubt. Please upvote.