Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you could put some comments into the code so I could learn as I go that would be amazing thanks. COP 3223- HW on

If you could put some comments into the code so I could learn as I go that would be amazing thanks.

COP 3223- HW on one dimensional arrays
 
 
The goal is to write a C program that runs as shown in following sample run:  
 
Sample Run:
 
Enter how many students do you have ( but up to 50): 6

Enter the 6 scores: 100 85 78 90 40 65
 
Here are the scores with their corresponding grades:

100 A

85  B

78 C

90 A

40 F

65 D
 
The average score is: 76.33
 
There are 4 out 6 who scored above the average. Goodbye!
 
 
For this, use the following functions:
 
void loadScores ( int S[] , int * n) This function asks the user to enter how many scores (into the pointee of n) and loads *n scores into array S
 
void printGrades ( int S[] , int n ); This function prints each score and its letter grade, using the standard grade assignment ( A if score is between 90 and 100. B if score is between 80 and 89, … etc)
 
double average ( int S[] , int n ); This function returns the average of the n scores stored in array S
 
 
int countAboveAvg ( int S[] , double avg, int n);  This function counts and returns how many students scored above or equal to the average score (avg). S is the array, avg is the average score and n is how many scores to consider in S.

Step by Step Solution

3.42 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

solution copyable code include define MAXSIZE 50 void loadScoresint S int n void printGradesint S ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Control Systems

Authors: Richard C. Dorf, Robert H. Bishop

12th edition

136024580, 978-0136024583

More Books

Students also viewed these Programming questions

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago