#include }cout<<'\n';
void main()
{ int i,j;
int a[2][3]={1,2,3,4,5,6};
int b[3][2];cout<<"原数组:"<
{
cout<
}cout<<"转换后的数组:"<
{b[i][j]=a[j][i];
cout<}
cout<<'\n';
} }
结果截图::
int a[2][3]={1,2,3,4,5,6};int b[3][2]={0};for(j=0;j<2;j++) for(i=0;i<3;i++)b[i][j]=a[j][i];