fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int a[10];
  7. int n=sizeof(a)/sizeof(a[0]);
  8. int max=0;
  9. for(int i=0;i<n;i++){
  10. cin>>a[i];
  11. if(a[i]>max) max=a[i];
  12. }
  13. cout<<max;
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5288KB
stdin
1
2
3
4
5
6
7
8
9
10
stdout
10