chenlong991223
#include<stdio.h>
int main()
{
    int n,m,a[10][10],b[10][10];
    while(scanf("%d%d",&n,&m)!=EOF)
    {
        
        for(int i=0;i<n;i++)
        {
            for(int j=0;j<m;j++)
            {
                scanf("%d",&a[i][j]);
            }
        }
        
        for(int i=0;i<m;i++)
        {
            for(int j=0;j<n;j++)
            {
                b[i][j]=a[j][i];
            }
        }
        
        for(int i=0;i<m;i++)
        {
            for(int j=0;j<n-1;j++)
            {
                printf("%d ",b[i][j]);
            }
            printf("%d\n",b[i][n-1]);
        }
    }
    return 0;
}

 

分类:

技术点:

相关文章:

  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案