fork download
  1. #include<iostream>
  2. #define f0n for (int i = 0; i < n; i++)
  3. using namespace std;
  4. int main() {
  5. int arr[100], n, maximum = -1e9;
  6. cin >> n;
  7. for (int i = 0; i < n; i++) {
  8. cin >> arr[i];
  9. }
  10. for (int i = 0; i < n; i++) {
  11. maximum = max(maximum, arr[i]);
  12. }
  13. cout << maximum;
  14. }
Success #stdin #stdout 0s 5304KB
stdin
10 
214 423 3523 2342 352 2532 23432 325 44 234
stdout
23432