fork download
  1. #include <stdio.h>
  2. #define max 11
  3. int main(void) {
  4. // your code goes here
  5. int data[max];
  6. int i,a,temp=0;
  7. for(a=1;a<=11;a++){
  8. scanf("%d",&data[a]);
  9. }
  10. for(i=0;i<max;i++){
  11. if(data[i]<data[i+1]){
  12. temp=data[i];
  13. data[i]=data[i+1];
  14. data[i+1]=temp;
  15. }
  16. }
  17. printf("%d",data[5]);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 5316KB
stdin
1
2
3
4
5
6
7
8
9
10
11
stdout
6