fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[]={3,5,2,4,1,9,7,6,0,8},x;
  5. printf("3,5,2,4,1,9,7,6,0,8\n");
  6.  
  7. x=a[0];
  8. a[0]=a[3];
  9. a[3]=x;
  10.  
  11. x=a[3];
  12. a[3]=a[5];
  13. a[5]=x;
  14.  
  15. x=a[5];
  16. a[5]=a[8];
  17. a[8]=x;
  18.  
  19. for(int i=0;i<10;i++){
  20. printf("%d",a[i]);
  21. }
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
3,5,2,4,1,9,7,6,0,8
4529107638