Write a C program that does the following. (a) Start with comment statements at the top...

80.2K

Verified Solution

Question

Programming

Write a C program that does the following.

(a) Start with comment statements at the top (before yourincludes) with the following info: Name, Date

(b) Write the following functions:

void setupRandArray(int n, int x[], int min, int max)

void printArray(int n, int x[], char label[])

float getAverage(int n, int x[]) int getMaximum(int n, intx[])

int getCountInRange(int n, int x[], int min, int max)

Note: This function returns the number elements of x that arebetween min and max (including min and max).

(c) Write a main to test your functions. Create an array ofrandom test scores between 70 and 100. Compute the average score,the high score, and the number of B grades.

A typical output is shown below. Do all printing of results atthe end of main. Run your program twice: once with 10 scores andthen with 20 scores. Put your output in comments underneathmain.

Hint: Set up a variable for the array size in main so that youcan easily change it.

scores: 78 93 72 98 94 92 86 90 83 75

ave: 81.2

high: 98

numB: 2

scores: 88 71 95 83 88 90 72 89 79 73 94 91 86 88 78 92 82 81 7670

ave: 83.2

high: 95

numB: 8

Answer & Explanation Solved by verified expert
4.2 Ratings (870 Votes)
C CodeName Roll include include    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students