Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use the info in Hints to code this, also use comments. Write a C++ program which will ask the user to input three integer

Please use the info in Hints to code this, also use comments.

image text in transcribed

Write a C++ program which will ask the user to input three integer numbers and then output which number is the largest, which is the second largest and which is the smallest. We will not worry about any ties where two numbers are the same. Make sure your code works for any three input numbers, not just the test cases. Your code will be tested on other test cases not listed here. Please properly comment your code before submission. Sample Test cases: Test case 1: Enter the first number:15 Enter the second number: 9 Enter the third number: 21 Test case 2: Enter the first number: 91 Enter the second number: 44 Enter the third number: 19 The largest number is 21 The next largest number is 15 The smallest number of 9 Test case 3: Enter the first number:9 Enter the second number: 73 Enter the third number: 72 The largest number is 91 The next largest number is 44 The smallest number of 19 Test case 4: Enter the first number:-37 Enter the second number: -77 Enter the third number: 5 The largest number is 73 The next largest number is 72 The smallest number of 9 The largest number is 5 The next largest number is -37 The smallest number of -77 HINTS: Use cin and cout for input from the user and output to the screen. cin and cout can be imported using the iostream library. You can use Integer datatypes. Use if-else and/or if-else if-else conditions to compare numbers

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions