Playground
#include <iostream> using namespace std; int main() { int n, t, najgolem = -1; cin >> n; for (int i=0; i<n; i++) { cin >> t; if (t > najgolem) najgolem = t; } cout << najgolem << endl; return 0; }
Input data
Program output
5 4 8 2 1 3
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!