Question
Write a program to store an input list of ten integers in an array: then display a table similar to the following table, showing each
Write a program to store an input list of ten integers in an array: then display a table similar to the following table, showing each data value and what percentage each value is of all ten values.
1. Below the table print a message giving the range of values used. Also write a message stating the average or mean value of the ten numbers and then print a table with the values that are greater than the average. Be sure to use proper identification.
2. Make the program output readable.
NOTE: To get the values to line up in columns like the example shown below try adding the function " setw() " to the cout statment to get values to appear in columns. To use the function you need #include < iomanip > in your program(leaving out the spaces I have between the less than and greater than symbols. Without them you could not read this).
Also, you might need the I/O manipulators fixed, showpoint, and setprecision. Try adding one line of code to your program right before your output line for printing each row of the table. Use " cout << fixed <<showpoint << setprecision(3) << endl; " to see what happens. When you format your output you can specify it to print out a particular number of decimal places, too. This does not
change the value in memory, only the way it appears on the output. For more information, look in the textbook pages 112-120.
3. Below will be the format for the output from the execution of your code(using any list of 10 integer values).
-----------------------------------------
Value Percent of Total
8 4.00
12 6.00
18 9.00
25 12.50
24 12.00
30 15.00
28 14.00
22 11.00
23 11.50
10 5.00
Values used range from 8 to 30
Average of the Ten Values = 20.00
Values above the Average
25
24
30
28
22
23
Step by Step Solution
3.33 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
Code file is submitted at httpsgithubcomrav...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