compiler-design-eth/javali_tests/HW4/OkArrayElementsMath.javali

15 lines
254 B
Text
Raw Normal View History

2020-01-15 22:34:57 +01:00
/* Test expressions using array elements as operands */
class Main {
int[] x;
void main() {
int i;
x = new int[3];
x[0] = 3;
x[1] = 4;
x[2] = 5;
i = x[0] + x[1] + x[2];
write(i);
writeln();
}
}