#include
main(){
int m,n;
int i,j;
int line_sum=0,row_sum=0;
int total=0;
int a[100][100];
printf("输入行数:");
scanf("%d",&m);
printf("输入列数:");
scanf("%d",&n);
//输入矩阵
printf("输入矩阵:\n");
for(i=0;i
scanf("%d",&a[i][j]);
}
//返回行的和
for(i=0;i
for(j=0;j
total+=line_sum;
printf("第%5d行的和:%5d",i+1,line_sum);
printf("\n");
}
printf("*******************\n");
//返回列的值
for(i=0;i
for(j=0;j
total+=row_sum;
printf("第%5d列的和:%5d",i+1,row_sum);
printf("\n");
}
printf("*******************\n");
//总和
printf("合计:%d\n",total);
return 0;
}