-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTEST.iloko
More file actions
51 lines (42 loc) · 1001 Bytes
/
TEST.iloko
File metadata and controls
51 lines (42 loc) · 1001 Bytes
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
IPAKITA "--- Welcome to ILOKO ---"
IKABIL greeting = "Hello"
IKABIL user = "Student"
IPAKITA greeting + " " + user + "!"
IPAKITA " "
IPAKITA "--- Let's do some math ---"
IKAIL a = 100
IKABIL b = 20
IPAKITA "a = 100, b = 20"
IPAKITA "a * b = "
IPAKITA a * b
IPAKITA ""
IPAKITA "--- Now, let's draw a simple tree ---"
IKABIL height = 7
IKABIL i = 0
BAYAT i < height
IKABIL spaces = ""
IKABIL j = 0
IKABIL num_spaces = height - 1 - i
BAYAT j < num_spaces
IKABIL spaces = spaces + " "
IKABIL j = j + 1
NALPAS
IKABIL stars = ""
IKABIL k = 0
IKABIL num_stars = 2 * i + 1
BAYAT k < num_stars
IKABIL stars = stars + "*"
IKABIL k = k + 1
NALPAS
IPAKITA spaces + stars
IKABIL i = i + 1
NALPAS
IKABIL trunk_spaces = ""
IKABIL j = 0
IKABIL num_trunk_spaces = height - 1
BAYAT j < num_trunk_spaces
IKABIL trunk_spaces = trunk_spaces + " "
IKABIL j = j + 1
NALPAS
IPAKITA trunk_spaces + "|"
IPAKITA trunk_spaces + "|"