Swapping Values in C++
In this lab, you complete a C++ program that swaps values stored...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 24.03.2020 05:36 sophiaa23
Swapping Values in C++
In this lab, you complete a C++ program that swaps values stored in three int variables and determines maximum and minimum values. The C++ file provided for this lab contains the necessary variable declarations, as well as the input and output statements. You want to end up with the smallest value stored in the variable named first and the largest value stored in the variable named third. You need to write the statements that compare the values and swap them if appropriate. Comments included in the code tell you where to write your statements.
Instructions
Ensure the Swap. cpp file is open in your editor.
Write the statements that test the first two integers, and swap them if necessary.
Write the statements that test the second and third integer, and swap them if necessary.
Write the statements that test the first and second integers again, and swap them if necessary.
Execute the program by clicking the "Run Code" button at the bottom of the screen using the following sets of input values.
101 22 -23
630 1500 9
21 2 2
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:00
Which parts of a presentation should be the most general? a. introduction and conclusion b. introduction and outline c. outline and conclusion d. outline and body
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:50
When is it most apprpriate for a development team to change the definition of done
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/himiya.png)
Chemistry, 17.10.2019 22:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.10.2019 22:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/health.png)
Health, 17.10.2019 22:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.10.2019 22:30
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 17.10.2019 22:30
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 17.10.2019 22:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.10.2019 22:30
![question](/tpl/images/cats/en.png)
English, 17.10.2019 22:30
![question](/tpl/images/cats/en.png)
English, 17.10.2019 22:30
![question](/tpl/images/cats/istoriya.png)
History, 17.10.2019 22:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.10.2019 22:30
![question](/tpl/images/cats/en.png)
English, 17.10.2019 22:30
![question](/tpl/images/cats/en.png)
English, 17.10.2019 22:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 17.10.2019 22:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 17.10.2019 22:30
![question](/tpl/images/cats/biologiya.png)