COMP 110-003 Spring 2013

Lab 4

25 points

Assigned: Thursday, February 14
Due: Thursday, February 28

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 (via console, not message box) and outputs the following statistics (to the console, not message box):

  1. Total number of games:
  2. Total number of games scoring at least 70 points:
  3. Percentage of games scoring at least 70 points:
  4. Average game score:
  5. Range of scores: lowest to highest (hint: define one variable for each)

The end of the input is indicated by the user entering a negative sentinel value. (See page 226 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

Grading

How to hand in the assignment