Hide
Problem A
Maximum Number
Accepted submissions to this problem will be granted a score of 100
Design an algorithm that finds the maximum positive integer input by a user.
The user repeatedly inputs numbers until a negative value is entered.
Input
Input consists of
Output
Output consists of one integer, the maximum integer input.
Sample Input 1 | Sample Output 1 |
---|---|
5 7 2 4 9 11 8 -1 |
11 |
Sample Input 2 | Sample Output 2 |
---|---|
21 19 16 46 78 23 99 34 23 -5 |
99 |