Question: / / LargeSmall.cpp - This program calculates the largest and smallest of three integer values. #include using namespace std; int main ( ) { /
LargeSmall.cpp This program calculates the largest and smallest of three integer values.
#include
using namespace std;
int main
Declare and initialize variables here
int largest; Largest of the three values
int smallest; Smallest of the three values
int firstNumber ;
int secondNumber ;
int thirdNumber ;
Write assignment, if or if else statements here as appropriate
Output largest and smallest number.
cout "The largest value is largest endl;
cout "The smallest value is smallest endl;
return ;
Two variables named largest and smallest are declared for you. Use these variables to store the largest and smallest of the three integer values. Three variables have been declared for you firstNumber, secondNumber thirdNumber. You must decide what other variables you will need and initialize them as appropriate.
Task : Write the rest of the program using assignment statements, if statements, or if else statements as appropriate. There are comments in the code that tell you where you should write your statements.The output statements are written for you.
An example of the program is shown below:
The largest value is The smallest value is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
