fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int a[5] = {5,7,4,6,8};
  7. int i, j ,t;
  8. for(i = 0;i<5;i++)
  9. for(j=1;j<5;j++)
  10. t = a[i];
  11. a[i] = a[j];
  12. a[j] = t;
  13. printf("%d",a);
  14.  
  15. }
Success #stdin #stdout 0s 4296KB
stdin
Standard input is empty
stdout
-573090784