• Home
  • Blog
  • Geek-aka-hostler(Low Score Drop)

Geek-aka-hostler(Low Score Drop)

0 comments

Write a program that calculate the average of a group of test scores, where the lowest score is dropped. It should use the following functions:

  • void getScore() – should ask the user for a test score, store it in a reference parameter variable, and validate it. The function should be called by main once for each of the five scores to be entered.
  • void calculateAverage() – should calculate and display the average of the four highest scores. The function should be called just once by main, and should be passed the five scores.
  • int findLowest() – should find and return the lowest of the five scores passed to it.  It should be called by calcAverage, which uses the function to determine which of the five scores to drop.

Validation: Do not accept test scores lower than 0 or higher than 100.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}