2020-01-15 22:32:25 +01:00
|
|
|
/* Test expression evaluation with 8 variables */
|
|
|
|
class Main {
|
|
|
|
void main() {
|
|
|
|
int r1, r2, r3;
|
|
|
|
int i0, i1, i2, i3, i4, i5, i6, i7;
|
|
|
|
|
|
|
|
i0 = 0;
|
|
|
|
i1 = 1;
|
|
|
|
i2 = 2;
|
|
|
|
i3 = 3;
|
|
|
|
i4 = 4;
|
|
|
|
i5 = 5;
|
|
|
|
i6 = 6;
|
|
|
|
i7 = 7;
|
|
|
|
|
2020-01-15 22:34:57 +01:00
|
|
|
write(i0 + (i1 + ( i2 + ( i3 + ( i4 + (i5 + (i6 + (i7 + i0)))))))); writeln();
|
2020-01-15 22:32:25 +01:00
|
|
|
write(((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7); writeln();
|
|
|
|
write(((i0 + i1) + (i2 + i3)) + ((i4 + i5) + (i6 + i7))); writeln();
|
|
|
|
}
|
|
|
|
}
|