Question: Write an ANSI C program that determines the minimum grade, maximum grade, median grade and average of a class. Your program should first prompt for

Write an ANSI C program that determines the minimum grade, maximum grade, median grade and average of a class. Your program should first prompt for class name, and then how many grades(at least 2), then each of the grades. Your program should test that each numeric grade value entered is valid (i.e., between 0 and 100) and id numbers will be from 1 to 99999 and displayed zero filled as shown in the sample below. If the grade entered is not valid, the program should issue an error message like the one shown below, and re-prompt for a correct grade, and do the same if an id number is invalid. Once all grades are entered, your program should calculate the minimum grade, maximum grade, and average, and median. It will then print the grades listed in descending order.(without sort the program will only be worth 50%). Your program should store all the grades entered in an array like: int grade[50]; and all of the id numbers in an array like: int id[50]; for example.

The dialog with the user must look exactly like:

Enter Class Name: Java I

Welcome to the Java I Grade Calculator

Enter the number of grades to process (2 - 50): 7

Enter id number for student #1: 1234

Enter grade for student #1: 80

Enter id number for student #2: 55511

Enter grade for student #2: 90

Enter id number for student #3: 23445

Enter grade for student #3: 100

Enter id number for student #4: 3765

Enter grade for student #4: 85

Enter id number for student #5: 37788

Enter grade for student #5: 572

*** Invalid grade entered. Please enter 0 - 100. ***

Enter grade for student #5: 72

Enter id number for student #6: 09932

Enter grade for student #6: 65

Enter id number for student #7: 00123

Enter grade for student #7: 96

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!