这个还不简单?
#include
#define N 3
void fun(int a[][N],int n)
{
int i,j;
for(i=0;ifor(j=0;j {
if(i<=j)
a[i][j]=a[i][j]*n;
}
}
int main()
{
int a[N][N]={1,2,3,4,5,6,7,8,9};
int i,j;
for(i=0;i{
for(j=0;jprintf("%d\t",a[i][j]);
printf("\n");
}
fun(a,6);
for(i=0;i{
for(j=0;jprintf("%d\t",a[i][j]);
printf("\n");
}
return 0;
}