The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
In many Olympic sports, an athlete is given scores by a panel of judges. Scores can range from 0.0 (awful) to 10.0 (perfect). To ensure fairness, the highest and lowest scores are dropped, and the remaining scores are averaged to produce the athlete's overall score.
Â
Ask the user for the following information, in this order:
Â
The number of judges on the panel (an integer).
Â
The score given by each judge, one by one (real numbers).
Â
Compute the average of all scores except the highest and lowest (a real number). If two or more judges give the same lowest score, only one should be dropped (the same principle applies to ties for the highest score).
Â
Example:
java Scores 4 [this is the number of judges, not a score] -4.3 User entered bad input. 3.7 4.9 11.0 User entered bad input. 10.5 User entered bad input. 10.0 4.3 RESULT: 4.6
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll