Programming Assignment #1

Due: Friday 9/14/00

Part A

Write a C program that calculates the mean, median, and range of integer values entered interactively (from the keyboard). Have the main function read (using scanf) the number of integers first, followed by the integers, and then have the main program call a single procedure "Calculate" to calculate and return the mean, median, and range.

Part B

Modify your program from Part A to read the integer values entered on the command line

        pa1b.out 12 42 5 93 17 22

Submission procedure:

By the beginning of class on September 14th, send me an email (schafer@cs.uni.edu) with the source code files attached named pa1a.c and pa1b.c.