填空题 C语言
题号 #2570105

求主次对角线之和。
main()
{static int a[ ][3]={9,7,5,1,2,4,6,8};
int I,j,s1=0,s2=0;
for(I=0;I<3;I++)
for(j=0;j<3;j++)
{if(__________)
s1=s1+a[I][j];
if( __________ )
s2=s2+a[I][j];
}
printf(“%d\n%d\n”,s1,s2);
}

进入在线模考

参考答案

暂无

答案解析

I==j I+j==2

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考