Instructions Consider the following program segment: //includestatement(s) //usingnamespacestatement intmain() { //variabledeclaration //executablestatements //returnstatement } Write a C++ statement...

1 answer below »


Instructions


Consider the following program segment:


//includestatement(s)
//usingnamespacestatement
intmain()
{
//variabledeclaration
//executablestatements
//returnstatement
}


Write a C++ statement that includes the header fileiostream.


Proceed through all the steps in this activity by clicking the navigation arrows at the bottom of this pane after completing each step.



Instructions


Consider the following program segment:


//includestatement(s)
//usingnamespacestatement
intmain()
{
//variabledeclaration
//executablestatements
//returnstatement
}


Write a C++ statement that includes the header fileiostream.


Proceed through all the steps in this activity by clicking the navigation arrows at the bottom of this pane after completing each step.


Instructions


Write a C++ statement that allows you to usecin,cout, andendlwithout the prefixstd::.



Write C++ statement(s) that declare the following variables:num1,num2,num3, andaverageof typeint.




Write C++ statements that store125intonum1,28intonum2, and–25intonum3.




Write a C++ statement that stores the average ofnum1,num2, andnum3intoaverage.




Final Step:


Write C++ statement(s) that output the values ofnum1,num2,num3, andaverage.


Then compile and run your program by clicking the blue run button on the right side of the screen.

Answered Same DayOct 03, 2021

Answer To: Instructions Consider the following program segment: //includestatement(s)...

Neha answered on Oct 03 2021
129 Votes
//include statement(s)
#include
//using namespace statement
using namespace std;
int m
ain()
{
//variable declaration
int num1, num2, num3, average;
//executable statements
num1 = 125;
num2 = 28;
num3 = -25;
average = (num1 + num2 + num3)/3;
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here