L4 - C

public
yeskendir.sultanov Mar 27, 2024 Never 62
Clone
C++ l4c.cpp 22 lines (18 loc) | 327 Bytes
1
#include <bits/stdc++.h>
2
3
using namespace std;
4
5
int main() {
6
int max;
7
cin >> max;
8
while (true) {
9
int x;
10
cin >> x;
11
if (x == 0) {
12
break;
13
}
14
15
if (x > max) {
16
max = x;
17
}
18
}
19
20
cout << max;
21
return 0;
22
}
23
24