Ask user entering five test scores and calculate the average according to drop the lowest score.

  A[0] A[1] A[2] A[3] A[4]

declare by

 int A[5];
element 78 89 67 55 93    
index 0 1 2 3 4    

Text Box: 55
A

Text Box: Lowest
Text Box: 78

Text Box: 67

 

Text Box: 78
Text Box: total
Text Box: 0
Text Box: 289
Text Box: 234
Text Box: 167
Text Box: 382
Text Box: 327

Text Box: drop the lowest

 

 

 

After drop the lowest score, you divide the total by 4.0 (note: not 4) to get the average.

The grade will be assigned by the rules below.

Score Range Grade
[90, 100] A
[80, 90) B
[70, 80) C
[60,70) D
[0,60) F

Here is an example of output.