Share your repls and programming experiences

← Back to all posts
6.8. While: Maximum of sequence
pole55 (102)

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