Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
245 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main() {
    int n, max,tmp;
    cin >> n;
    tmp = n;
    max = -1;

    while (tmp > 0) {
        int a;
        cin >> a;
        if (a > max) max = a;
        tmp -= 1;
    }
    cout << max;
}