changeset 854 | ce4a7bab6bd8 |
parent 820 | 7fd1f611c21d |
853:568671822d52 | 854:ce4a7bab6bd8 |
---|---|
2 |
2 |
3 def sqr(x: Int) : Int = x * x; |
3 def sqr(x: Int) : Int = x * x; |
4 |
4 |
5 def all(n: Int) : Void = { |
5 def all(n: Int) : Void = { |
6 if n <= Max |
6 if n <= Max |
7 then print_int(sqr(n)) ; all(n + 1) |
7 then { print_int(sqr(n)) ; new_line(); all(n + 1) } |
8 else skip() |
8 else skip() |
9 }; |
9 }; |
10 |
10 |
11 all(0) |
11 all(0) |
12 |
12 |