#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int arr[4][4],i,j;
int temp[4][4];
for (i=0;i<=3;i++)
{
printf("请输入第%d行数据:",(i+1));
for (j=0;j<=3;j++)
scanf_s("%d",&arr[i][j]);
}
for (i=0;i<=3;i++)
for(j=0;j<=3;j++)
{
temp[i][j]=arr[j][i];
}
printf("转换后的矩阵为:\n");
for (i=0;i<=3;i++)
for(j=0;j<=3;j++)
{
printf("%d ",temp[i][j]);
if(j==3)
printf("\n");
}
system("pause");
return 0;
}