Untitled
yere#include <iostream> #include <string> using namespace std; int main() { int a, n, max = 0; cin >> n; for (int i = 1; i <= n; i++) { cin >> a; if (a >= max) { max = a; } } cout << endl; cout << max; }
#include <iostream> #include <string> using namespace std; int main() { int a, n, max = 0; cin >> n; for (int i = 1; i <= n; i++) { cin >> a; if (a >= max) { max = a; } } cout << endl; cout << max; }