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

16 lines
217 B
Plaintext

#include "sylib.h"
#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;
}