6.8. While: Maximum of sequence
Given a sequence of non-negative integers, where each number is written in a separate line. The sequence ends with 0. Print the maximum of the sequence.
Example input
1
2
3
2
1
0
Example output
3
Given a sequence of non-negative integers, where each number is written in a separate line. The sequence ends with 0. Print the maximum of the sequence.
Example input
1
2
3
2
1
0
Example output
3