#include<iostream>
using namespace std;
void fun(int a[3][3]);
main()
{
int n,i,j,a;
n=0;
cout<<"input a[3][3]:\n";
for(i=1;i<=3;i++)
{
for(j=1;j<=3;n++)
{
if(n%3==0)
{
cout<<"\n";
}
cout<<"a[i][j]="<<a;
}
cout<<"\n";
}
return 0;
}
void fun(int a[3][3]);
{
cout<<"转置后的数组:\n"
for(j=1;j<=3;j++)
{
for(i=1;i<=3;n++)
{
if(n%3==0)
{
cout<<"\n";
}
cout<<"b[j][i]="<<a[i][j];
}
cout<<"\n";
}
}
麻烦各位帮忙看下
using namespace std;
void fun(int a[3][3]);
main()
{
int n,i,j,a;
n=0;
cout<<"input a[3][3]:\n";
for(i=1;i<=3;i++)
{
for(j=1;j<=3;n++)
{
if(n%3==0)
{
cout<<"\n";
}
cout<<"a[i][j]="<<a;
}
cout<<"\n";
}
return 0;
}
void fun(int a[3][3]);
{
cout<<"转置后的数组:\n"
for(j=1;j<=3;j++)
{
for(i=1;i<=3;n++)
{
if(n%3==0)
{
cout<<"\n";
}
cout<<"b[j][i]="<<a[i][j];
}
cout<<"\n";
}
}
麻烦各位帮忙看下