You are asked to write a program that will enter test scores of 10 students into an array - scores. Your program will compute the grade for each student. Grades will be stored in another array grades. Both the arrays have the size to accommodate 10 scores and 10 grades.

There are 10 students so you will use a constant NUM_SCORES equals to 10.

Use the following arrays:

  • scores - stores scores - type int
  • grades - stores grades - type char

Use the following functions. MUST use function prototypes so the functions are placed after the function main().

1.The function getScore is used to enter the scores into the array.

get_score (scores, NUM_SCORES);

Use this prompt message to enter the score:

Enter score #1: _ _

2.The function computeGrade computes the grade for each student and stores the grades in the grade array.

computeGrade (scores, grades, NUM_SCORES);

The grades are assigned based on the following table.

Score Grade
90 - 100 A
80 - 89 B
70 - 79 C
60 - 69 D
0 - 59 F

3.The function pass will determine and return the number of passing scores. A score greater than or equal to 60 is considered a passing score.

passNumber = pass (scores, NUM_SCORES);

4.The function findHigh will find out and return the highest test score.

highScore = find_High (scores, NUM_SCORES);

5.The function printSummary will print the output as shown.

printSummary (scores, grades, passNumber, highScore, NUM_SCORES);

Use the following test data: (10 scores)

51, 89, 97, 64, 48, 60, 80, 89, 79, 69

The output will be displayed as follows:

Score No. Score Grade
1 51 F
2 89 B
3 97 A
4 64 D
5 48 F
6 60 D
7 80 B
8 89 B
9 79 C
10 69 D

The number of students that passed the test: 8

The highest test score: 97

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.