Question
C++ programming language Write a program that asks the user for a file name. The file contains a series of scores(integers), each written on a
C++ programming language
Write a program that asks the user for a file name. The file contains a series of scores(integers), each written on a separate line. The program should read the contents of the file into an array and then display the following content:
1) The scores in rows of 10 scores and in sorted in descending order. 2) The lowest score in the array 3) The highest score in the array 4) The total number of scores in the array 5) The average score in the array. 6) The median score in the array.
Program structure should be as follows:
A top level function named TestScoreAnalysis() which accepts a file of scores to be analyzed and displayed to the console screen describing the six content items specified above.
-- A function to read data from file into an Array -- A function to sort an array in descending order
A separate function for each analysis task: -- The scores in rows of 10 scores and in sorted in descending order. -- The lowest score in the array -- The highest score in the array -- The total number of scores in the array -- The average score in the array. -- The median score in the array.
Allocate an array to hold at least 100 scores.
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