Project 7: Max, Min and Mean (Mmm!)

April 11, 2011

Due Monday, April 18 at 11:59PM

Objective

Gain additional experience with user input, looping, branching and floating point instructions.

Requirements

Write a program that prompts the user for five integers and displays the minimum value, maximum value and average of entered values. The interaction should resemble the following:

Hello, it looks like you showered today. I'd like you to enter five integers:
Enter an integer: 8
Enter an integer: -6
...
Enter an integer: 9
Great, just greeeaaaat.
Minimum: -6
Maximum: 127
Mean: 67.333...

Lastly, make sure your program exits correctly by using the appropriate syscall.

Hints

Complete each feature one step at a time. Can you prompt the user? Can you initialize a 5-word array? Can you write a loop that captures the user input five times and places each value in subsequent locations in the array? Can you determine the maximum? The minimum? Lastly, how can you calculate a floating point mean when all values are integers? (Hmmm... how do you convert from an int to a single-precision float?)

Grading Criteria (800 points)

Copy your code and paste it into the text area of your blackboard submission.

Your program must be functionally correct for full credit.