请大家帮我看看这个小程序错在哪了?谢谢!!!
#include <iostream>using namespace std;
int main()
{
int i,j,b [4][4]
int a[4][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}};
cout <<"Before converting" <<endl;
for (i=0;i<4;i++)
{
for (j=0;j<4;j++)
{
cout.width(4);
cout<<a[i][j];
}
cout <<endl;
}
for (i=0;i<4;i++)
for (j=0;j<4;j++)
b[j][i]=a[i][j];
cout<<"after converting"<<endl;
for (i=0;i<4;i++)
{
for (j=0;j<4;j++)
{
cout.width(4);
cout<<b[i][j];
}
cout<<endl;
}
return 0;
}