Assignment (5)

CS1440 – Due September 29,
2000

1.

Write a program in C++ that reads three real values as input and finds the largest of the three, the smallest of the three, and then print a message saying which one was the largest, the smallest, and between the two. Your program has to have three functions: Max_abc, Min_abc, and Print_abc. As one may guess, the Max_abc and Min_abc are to find the maximum and the minimum of the three numbers respectively. The Print_abc function is to display messages regarding the max, min, and the one in between.

Your program should ask whether you have another set
of numbers to process. Your grade will
be based on indentation, header, correct compilation, and correct answer.

Sample input:

Please enter three values for a, b, and c

34 12 20

Sample output:

a = 34 is the maximum of the three numbers

c = 20 is the middle value

b = 12 is the smallest of the three numbers

If you want to look at another set enter y,
otherwise n to exit ?

You need to submit the hardcopy and electronic copy
using submit command. Programs without
hardcopy will receive 10 points penalty.
Programs submitted 48 hours early, will receive 10 points extra.