Write a C++ program in this new file. Hint: you can use helloworld.cpp as a template. In this new file, write a program that does the following: 1. Accepts 10 integers from the user using an array and a loop. The user will type the input on the console. 2. Prints the numbers entered by the user in reverse order from the order in which they were entered. This output is displayed on the console. 3. Sorts the contents of the array from lowest to highest number and displays the numbers in this new, sorted order.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question
Write a C++ program in this new file. Hint: you can use helloworld.cpp as a template. In this new file,
write a program that does the following:
1.
Accepts 10 integers from the user using an array and a loop. The user will type the
input on the console.
2.
Prints the numbers entered by the user in reverse order from the order in which they
were entered. This output is displayed on the console.
3.
Sorts the contents of the array from lowest to highest number and displays the
numbers in this new, sorted order.
o Note: You are allowed to use any existing sorting algorithm. However, you are NOT allowed to use a
library implementation of the algorithm. You must implement the algorithm from scratch.
Two simple algorithms that could be used for this task are Bubble Sort e (url:
https://en.wikipedia.org/wiki/Bubble sort e ) and Insertion Sort e (url:
https://en.wikipedia.org/wiki/lInsertion sort -). You may implement either one or choose
another one if you prefer.
Make sure to compile and test your program to be certain it works as expected. If you aren't sure
how to compile and run a C++ program, refer to Slides 20 & 21 of the Cloud9SetUpSlides e .
When your program is complete, refer to Slide 23 of the Cloud9SetUpSlides e to see how to
download the arrayLoops.cpp file and upload the file to this quiz question.
Transcribed Image Text:Write a C++ program in this new file. Hint: you can use helloworld.cpp as a template. In this new file, write a program that does the following: 1. Accepts 10 integers from the user using an array and a loop. The user will type the input on the console. 2. Prints the numbers entered by the user in reverse order from the order in which they were entered. This output is displayed on the console. 3. Sorts the contents of the array from lowest to highest number and displays the numbers in this new, sorted order. o Note: You are allowed to use any existing sorting algorithm. However, you are NOT allowed to use a library implementation of the algorithm. You must implement the algorithm from scratch. Two simple algorithms that could be used for this task are Bubble Sort e (url: https://en.wikipedia.org/wiki/Bubble sort e ) and Insertion Sort e (url: https://en.wikipedia.org/wiki/lInsertion sort -). You may implement either one or choose another one if you prefer. Make sure to compile and test your program to be certain it works as expected. If you aren't sure how to compile and run a C++ program, refer to Slides 20 & 21 of the Cloud9SetUpSlides e . When your program is complete, refer to Slide 23 of the Cloud9SetUpSlides e to see how to download the arrayLoops.cpp file and upload the file to this quiz question.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,