Create a program that stores 5 numbers, prompted for, and acquired from the user, in an array and then displays them to the screen on one line in ascending order: (variable[0] variable[1]….....

Create a program that stores 5 numbers, prompted for, and acquired from the user, in an array and then displays them to the screen on one line in ascending order: (variable[0] variable[1]….. variable[4]) When prompting for each number, specify which number is being requested (Enter #1: … Enter #2: etc.). Each number should be displayed with 5 significant figures (3 to the left and 2 to the right of the decimal point). You should use leading zeroes for any numbers with a value of less than 100. As such, 87.52 should appear as: 087.52. There should be 3 spaces between each value. Once the first line is printed, do the same on the next line but in descending order: (variable[4] variable[3]….. variable[0]). The decimal points for each number in this row should line up with the numbers in the previous row. Finally, calculate and display the average value of the 5 numbers on a third line.
Feb 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here