CPTR 124 Fundamentals of Programming

Write a program that allows the user to enter in exactly five integer values. The program then should print the largest of the five values entered. A sample run is shown here:

Please enter five integer values: 20 -1 6 31 19
The maximum is 31.

Even if there is a tie for the maximum value, just print the maximum once.

Hint: You can use relatively complicated Boolean expressions in your logic, or you can use very simple conditional expressions. The simple option requires an additional variable. The tradeoff of an extra variable for the greatly simplified logic is a good one.