sysy-data/functional/sy/34_arr_expr_len.sy

12 lines
183 B
Plaintext
Raw Permalink Normal View History

2024-01-09 19:48:14 +08:00
const int N = -1;
int arr[N + 2 * 4 - 99 / 99] = {1, 2, 33, 4, 5, 6};
int main() {
int i = 0, sum = 0;
while (i < 6) {
sum = sum + arr[i];
i = i + 1;
}
return sum;
}