Question: Understanding if else Statements in C++ Understanding if else Statements Summary In this lab, you complete a prewritten C++ program that computes the largest and

Understanding if else Statements in C++

Understanding if else Statements

Summary

In this lab, you complete a prewritten C++ program that computes the largest and smallest of three integer values.

Instructions

Two variables named largest and smallest are declared for you. Use these variables to store the largest and smallest of the three integer values. You must decide what other variables you will need and initialize them if appropriate.

Your program should prompt the user to enter 3 integers.

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.

Execute the program by clicking the Run button at the bottom of the screen.

Using the input of -50, 53, 78, your output should be:

 The largest value is 78 The smallest value is -50

Program contains the necessary amount of if else statements needed to calculate the output and doesn't contain any hardcoded values.

2

Click the checkbox above to attempt this task.

Checks

Custom TestIncomplete

Contains necessary amount of if else statements

Attempt this task to view the check results.

Custom TestIncomplete

The program does not contain any hard coded calculated values

Attempt this task to view the check results.

0.00 out of 10.00

Program computes the largest and smallest of three integers.

3

Click the checkbox above to attempt this task.

Checks

Test CaseIncomplete

Program computes the largest and smallest of the following integers: -50, 53, 78.

Attempt this task to view the check results.

Test CaseIncomplete

Program computes the largest and smallest of the following integers: 11, 12, 13.

Attempt this task to view the check results.

Test CaseIncomplete

Program computes the largest and smallest of the following integers: -21, -1, -30.

Attempt this task to view the check results.

Understanding if else Statements in C++ Understanding if else Statements Summary In

Understanding if else Statements in C++

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!