Advertisement
huynhhothanhtra

Xuất ra mảng 2 chiều bị xoay theo chiều kim đồng hồ 90 độ

Feb 20th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.14 KB | None | 0 0
  1. void rotateArray(int a[][100], int n)
  2. {
  3.     for(int i =0; i<n;i++){
  4.         for(int j=0;j<n;j++){
  5.             cout<<a[j][n-1-i]<<" ";
  6.         }
  7.     cout<<endl;
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement