- 龙凤苑中学3.21
B 图像旋转
- @ 2025-3-21 17:16:02
#include <iostream>
using namespace std;
int a[100][100];
int main() {
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
cin>>a[i][j];
}
}
for(int j=1;j<=m;++j)
{
for(int i=n;i>=1;--i)
{
if(i<=n-1) cout<<' ';
cout << a[i][j];
}
cout<<endl;
}
return 0;
}
0 comments
No comments so far...