发布网友 发布时间:2024-12-04 14:30
共2个回答
热心网友 时间:2024-12-12 19:18
#include stdio.hint main(){ int i,j,a[3][3]={1,2,3,4,5,6,7,8,9};int row[3]={0},col[3]={0};for(i=0;ii++)for(j=0;jj++)row[i]+=a[i][j];for(j=0;jj++)for(i=0;ii++)col[j]+=a[i][j];for(i=0;ii++){for(j=0;jj++)printf("%2d ",a[i][j]);printf("%2d",col[i]);printf("\n");}for(i=0;ii++)printf("%2d ",col[i]);printf("\n");return 0;}热心网友 时间:2024-12-12 19:18
推荐试试matlab