C++ Pointer

denise0805

 

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)
    • 9 years ago
    • 15
    Answer(5)

    Purchase the answer to view it

    NOT RATED
    • NewMicrosoftOfficeWordDocument.docx

    Purchase the answer to view it

    NOT RATED
    • CPROGRAM.docx

    Purchase the answer to view it

    NOT RATED
    • CPointer.docx

    Purchase the answer to view it

    NOT RATED
    • Scores.zip

    Purchase the answer to view it

    NOT RATED
    • Score.zip