954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ignoring values if it is the highest or lowest...

how to make a program that will ignore the highest value and the lowest value, but will get the average of the remaining values..

for example: there are 6 inputted grades, then the 4 middle values should get their average.. and will ignore the highest and lowest..?

:)

kyumi419
Newbie Poster
14 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

how to make a program that will ignore the highest value and the lowest value, but will get the average of the remaining values..

for example: there are 6 inputted grades, then the 4 middle values should get their average.. and will ignore the highest and lowest..?

:)

write a loop that searches for the highest n lowest value.
Deduct them from the total of all.
Now divide that by total grades - 2.

dkalita
Posting Pro in Training
402 posts since Sep 2009
Reputation Points: 121
Solved Threads: 61
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: