3*3二维数组转置(C语言)
#include<stdio.h>voidmain(){intexchange(inta[3][3]);inti,j;inta[3][3];for(i=0;i<=2;i+...
#include<stdio.h>
void main()
{
int exchange(int a[3][3]);
int i,j;
int a[3][3];
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
scanf("%d ",&a[i][j]);
printf("\n");
}
exchange(a[3][3]);
}
int exchange(int a[3][3]);
{int i,j;
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
printf("%d ",a[j][i]);
}
}
哪里错了?
tc上说
13:Type mismatch in parameter 'a' in call to 'exchange'
16:Declaration termine incorrctly 展开
void main()
{
int exchange(int a[3][3]);
int i,j;
int a[3][3];
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
scanf("%d ",&a[i][j]);
printf("\n");
}
exchange(a[3][3]);
}
int exchange(int a[3][3]);
{int i,j;
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
printf("%d ",a[j][i]);
}
}
哪里错了?
tc上说
13:Type mismatch in parameter 'a' in call to 'exchange'
16:Declaration termine incorrctly 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询