Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

+ Facebook YouTube Netflix Disney+ - * GiaiTri.com to GoAnime G Google + Automatic Zoom : 2. Amazon 1 of 1 CS211 Homework - 1

image text in transcribed

+ Facebook YouTube Netflix Disney+ - * GiaiTri.com to GoAnime G Google + Automatic Zoom : 2. Amazon 1 of 1 CS211 Homework - 1 Write a C++ program which will ask the user to input three integer numbers and then 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 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 cour for input from the user and output to the screen. cin and cour 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. Search the web and your PC ORI e O x

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

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago