Question: Hello, I am currently taking a computer programming class in C++. I was given this assignment to complete that focuses on Arrays. I understand how
1) Create a txt file named "hwIdata.txt" that contains 30 students test scores in the range 0-100. Assume test scores are integers. You can use the following sample data: 76 84 75 62 58 75 93 54 36 87 81 88 68 90 73 80 74 84 96 100 61 5084 47 92 87 76 87 82 64 2) Read 30 test scores from the file "hwIdata.txt" and store them in a one-dimensional array 3) Write a function printList that prints the content of an array on the screen. The function has two formal parameters: an int array and an int variable containing the size of the array. 4) Write a function getLargest that finds and returns the largest value (first occurrence if more than one) in an array 5) Write a function getSmallest that finds and returns the smallest value (first occurrence if more than one) in an array 6) Write a function getAverage that finds and returns the average value of an array. The average value should be of type double. 7) In the function main, call the above functions to output all the test scores stored in the array, as well as the highest, the lowest, and the average test score. 8) In the function main, write statements to find the number of scores in each of the following ranges: 1) 0-50 (0score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
