Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class
MULT_TABLE
feature
print_table (n: INTEGER)
local i: INTEGER
do
from i := 1 until i > 10 loop
io.put_integer(n); io.put_string (" x "); io.put_integer(i); io.put_string (" = "); io.put_integer(n * i); io.put_new_line
i := i + 1
end
end
end
! Run
local
t: MULT_TABLE
do
create t
t.print_table(5)
endCoding works best on desktop or with an external keyboard.