代码文本:
#include "stdio.h"
int main(int argc,char *argv[]){
int a[4][4],i,j,k;
printf("Please enter data(int 0~99)...\n");
for(k=i=0;i<4;i++)//输入矩阵
for(j=0;j<4;scanf("%2d",a[i]+j++));
putchar('\n');
for(k=i=0;i<4;i++){//输出矩阵并按要求求和
for(j=0;j<4;printf("%3d",a[i][j++]))
if(i==2 || j==3)
k+=a[i][j];
putchar('\n');
}
printf("\nThe SUM is %d\n",k);
return 0;
}