compiler-design-eth/javali_tests/HW2/OkSimpleReturnWithExpression.javali

28 lines
341 B
Text
Raw Normal View History

2020-01-15 22:30:09 +01:00
class Main {
int m(int a, int b) {
return a + b + 1;
}
void main() {
int res;
res = -1;
res = m(1, 2);
write(res);
writeln();
res = this.m(1, 2);
write(res);
writeln();
write(m(1, 2));
writeln();
write(this.m(1, 2));
writeln();
}
}