In C ++ language Problem 2: Test Scores (Chapter 9: Pointers & chapter 8: Search
ID: 3913273 • Letter: I
Question
In C ++ language Problem 2: Test Scores (Chapter 9: Pointers & chapter 8: Searching and Sorting) Write a program that dynamically allocates an array large enough to hold a user defined number of test scores. Once all the scores are entered, the array should be passed to a function that sorts them in ascending order. Another function should be called that calculates the average score. The program should display the sorted list of scores and the average. Use pointer notation rather than array notation whenever possible. nput validation: Do not accept negative numbers for test scores. b. Drop Lowest Score Modify program (problem 2) so the lowest test score is dropped. included in the calculation of the average. This score should not beExplanation / Answer
#include #include using namespace std; void arrSelectSort(double *, int); void showArrPtr(double *, int); void showAverage(double, int); int main() { double *scores, total = 0.0; int numScores; cout > numScores; scores = new double[numScores]; if (scores == NULL) return 0; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.