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