mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-27 08:26:20 +00:00
12 lines
176 B
C
12 lines
176 B
C
int fun(int a[3][3]) {
|
|
int res = 0;
|
|
|
|
for (int i = 0; i < 3; i++) {
|
|
for (int j = i; j < 3; j++) {
|
|
res += a[i][j];
|
|
}
|
|
}
|
|
|
|
return res;
|
|
}
|