29.求3x3的整数矩阵对角线元素之和

 #include <stdio.h>
#include <stdlib.h> int main()
{
int i,j,sum=,a[][];
for(i=;i<;i++)
{
for(j=;j<;j++)
scanf("%d",&a[i][j]);
}
for(i=;i<;i++) //计算sum的时候,不要忘了此句,忘了此句则是计算所有的和
sum = sum+a[i][i];
printf("%d",sum);
return ;
}
上一篇:The currently selected variant "arm-debug" uses split APKs, but none of the 1 split apks are compatible with the current device with density "213" and ABIs "x86".


下一篇:HTML+Css让网页自动适应电脑手机屏幕