Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
229 B
3
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
    int n, c = 0, g =1;

    while (g)
    {
        cin >> n;
        
        if (n > c) c = n;

        if (n == 0) g = 0;
    }

    cout << c << endl;
}