-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-98.cl
51 lines (45 loc) · 1005 Bytes
/
test-98.cl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class Main inherits IO {
main(): Object{
let this_test: Test <- (new Test).init(in_int()) in {
out_int(this_test.test(in_int() + 2));
out_string("\n");
out_int(this_test.test(in_int()));
}
};
};
class Test inherits Main {
num: Int <- in_int();
count: Int <- 0;
init(x: Int): Test {
{
num <- x;
self;
}
};
-- make 1000 Cool Activation Records
test(a: Int): Int {
{
out_int(a);
num <- a + num;
if count < 400 then
{
out_int(num);
count <- count + 1;
test_2(num);
}
else
{
out_int(num);
num;
}fi;
}
};
test_2(a: Int): Int {
{
out_int(a);
num <- a + num;
out_int(num);
test(num);
}
};
};