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

16 lines
217 B
Plaintext
Raw Normal View History

2024-06-02 22:04:54 +08:00
#include "sylib.h"
2024-04-14 22:20:29 +08:00
#define 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;
}