CPTR 124 Fundamentals of Programming

Write a program that allows the user to enter in an arbitrary number of non-negative integer values. The user terminates the input with a negative integer. The program then should print the largest of the values the user entered. If the user enters a negative value at the beginning, the program should print nothing.

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

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