Write a c program that determines the minimum grade maximum


Programming Assignment

Write a C program that determines the minimum grade, maximum grade, and class average of an exam. Your program should first prompt for how many grades, then each of the grades. Your program should first test that the number of grades to process is between 0 and 10.

If number is not valid, your program should issue an error message as shown below, and re-prompt for the number of grades.

Your program should then test that each grade entered is valid (i.e., between 0 and 100).

If the grade entered is not valid, the program should issue an error message as shown below, and re-prompt for a correct grade.

Once all grades are entered, your program should calculate the minimum grade, maximum grade, and class average for that exam. It will then print the grades listed (sorted) in ascending order.

Note: There will be a 10 point deduction if your program does not sort the grades.

Your program should store all the grades entered in integer array: grades[10].

The dialog with the user must look exactly like:

Welcome to the Grade Calculator Enter the number of grades to process (0 - 10):

20 *** Invalid number of grades entered. ***

Enter the number of grades to process (0 - 10): 5

Enter grade for student #1: 80

Enter grade for student #2: 90

Enter grade for student #3: 172

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

*** Enter grade for student #3: 100

Enter grade for student #4: 85

Enter grade for student #5: 97

The minimum grade is 80

The maximum grade is 100

The class average is 90.4

The 5 grades entered are: 80, 85, 90, 97, 100

Thank you for using the Grade Calculator

Note: The blue text represents the "input" into your program. That is, what the user types in at the prompt. It is shown for clarity only here.

Your input will not be blue. (Do not even attempt to try!). Once the user enters a valid number of grades to process, the program should run as described above. If the user chooses to enter 0 as the number of grades, the program should simply end as shown here:

Welcome to the Grade Calculator

Enter the number of grades to process (0 - 10): 0

Thank you for using the Grade Calculator

Important: Do not use the qsort() function from the Standard C Library, it is a 10 point deduction.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a c program that determines the minimum grade maximum
Reference No:- TGS02900896

Expected delivery within 24 Hours

2015 ┬ęTutorsGlobe All rights reserved. TutorsGlobe Rated 4.8/5 based on 34139 reviews.