Answered You can hire a professional tutor to get the answer.

QUESTION

// Week 2 Assignment 1 // Anthony J. Bamber /* Write a program that dynamically allocates an array large enough to hold a user-defined number of test...

My code continues to give me an error.  I can't find the problem.Assignment 1

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 by the user, the array must be passed to a function that sorts them in ascending order. It must use another function that calculates the average score. The program should display the sorted list of scores and average with appropriate headings. The program must use pointer notation instead of array notation. Validation: Do not accept negative numbers for test scores; keep prompting the user for a new grade. Do not accept negative numbers for the number of scores the user wants to enter. The output should look like this:

Score

67.40

67.80

77.60

99.60

Average Score: 78.10

Program must have the following functions

  • void getGrades(double* score, int size)
  • void displayGrades(double* score, int size, double avg)
  • void sort(double* score, int size)
  • double average(double* score, int numScores)
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question