Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
204 B
0
Indexable
Never
#include <iostream>

using namespace std;

int main() {
    int n;
    int max = -1;
    while (cin >> n) {
        if (n > max && n != 0) max = n;
        else if (n == 0) break;
    }
    cout << max;
}