k0mZ

Untitled

Apr 27th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1.  
  2. void main() {
  3. int a[3][6] = {
  4. 1,2,3,4,5,6,
  5. 1,2,3,5,7,9,
  6. 2,2,4,4,6,6};
  7. int p,i,j,b[30],k;
  8.  
  9. for (i=0;i<3;i++){
  10. for (j=0;j<6;j++){
  11. printf("%d ",a[i][j]);
  12. }
  13. printf("\n");}
  14.  
  15.  
  16. printf("\n");
  17.  
  18. for (i=0;i<3;i++){
  19. k=0;
  20. for (j=5;j>=0;j--){
  21. b[k] = a[i][j];
  22. k++;
  23. }
  24.  
  25. k=0;
  26. for (j=0;j<6;j++){
  27. a[i][j] = b[k];
  28. k++;
  29. printf("%d ",a[i][j]);
  30. }
  31. printf("\n");
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment