Lab 8

4/8/04

Task: Write a program that asks the user to enter numbers. The program will continue asking for numbers either until it reaches a pre-set maximum number of numbers, or until the user enters a negative number.

The program should store these numbers in an array. When the user is finished entering numbers, it should pass the array to a function that will calculate the average of the numbers the user entered. This average should NOT include any negative number the user might have entered to indicate she was done.

Finally, the program should print out this average.

Purpose: The primary purpose of this lab is to give us more practice using arrays.