int main() { int a[3][3] = {{1, 2}, {3, 4}, {5, 6}}, i, j, s = 0; for(i = 1; i < 3; i++) for(j = 0; j <= i; j++) s += a[i][j]; printf("%d\n", s++); }
18
19
20
21
a[3][3] = { 1,2,0
3,4,0
5,6,0}; s = 3+4+5+6+0;
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题