COMP 110 Spring 2011

Lab 4

25 points

Assigned: Friday, February 18
Due: Friday, February 25 by 1:00pm


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 outputs 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

Additional Questions


How to hand in the assignment