Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using C++ create two arrays or vectors to store cities' names and temperature, and apply selection sort to sort both lists in the ascending order
Using C++ create two arrays or vectors to store cities' names and temperature, and apply selection sort to sort both lists in the ascending order of temperature.
Specification:
(1)Run MS Visual Studio 2019 to create a Console App;
(2)The app uses two separate arrays or vectors to store the following data:
(3) The app applies selection sort to sort the city names and temperature in the ascending order of temperature.
(4)The app outputs the result of sorting, one city name and temperature per line;
(5)Your app runs like the screenshot below:
City Temperature (Fahrenheit) Paris 37 70 Sydney Berlin 34 Rome 45 Athens 67 London 46 Houston 41 77 Singapore New York Tokyo 32 36 Jakarta 82 - X Microsoft Visual Studio Debug Console New York: 32 Berlin: 34 Tokyo: 36 Paris: 37 Houston: 41 Rome: 45 London: 46 Athens: 67 Sydney: 70 Singapore: 77 Jakarta: 82 D:\Teaching\Spring2e21\CPSC246\Homework\HW03\cities\Debug\cities.exe (process 45704) exited with code 0. To automatically close the console when debugging stops, enable Tools ->Options ->Debugging >Automatically close the con sole when debugeing stops. Press any key to close this window
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started