COMP 110-001: Introduction to Programming, SSI'15

Lab 4

25 points

Assigned: Tuesday, May 26, 2015
Due: Thursday, May 28, 2015 by 11:59pm (EDT)

Description

Lab 4 is to practice writing loop statements. Write a program to read in a list of UNC basketball scores (nonnegative integers!), one at a time from the user (via the console, not a message box), and outputs the following statistics (to the console, not a message box):

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

The input is ended by the user entering a negative sentinel value. (See page 227 for details). Note that the sentinel value is not used in computing the highest, lowest or average game score.

Suggestions for completing the assignment

Additional Questions

Grading

How to hand in the assignment