COMP 110 Summer 2011

Lab 4

Description

Lab 4 will give you practice with writing a loop. Write a program to read in a list of UNC basketball scores (nonnegative integers!) one at a time from the user and then output the following statistics:

  1. Total number of games
  2. Total number of games scoring at least 90 points
  3. Percentage of games scoring at least 90 points
  4. Average game score
  5. Range of scores: lowest to highest
The end of the input is indicated by the user entering a negative sentinel value. (See page 207 for details). Note that the sentinel value is not used in computing the highest, lowest or average game score.

Suggestions for starting the assignment