Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-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

-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

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;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Question What are the requirements for a safe harbor 401(k) plan?30

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago