Mode:
Duration:
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
class
FIBONACCI
feature
compute
do
local a, b, c, i: INTEGER
a := 0
b := 1
io.put_integer(a); io.put_new_line
io.put_integer(b); io.put_new_line
from i := 1 until i > 8 loop
c := a + b
io.put_integer(c); io.put_new_line
a := b
b := c
i := i + 1
end
end
end
! Run
local
f: FIBONACCI
do
create f
f.compute
endCoding works best on desktop or with an external keyboard.