-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.txt
61 lines (38 loc) · 749 Bytes
/
test.txt
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
52
53
54
55
56
57
58
59
60
61
# Comparison program
x = 1000
y = 5000
if x >= y
println "x is greater than or equals y"
if x < y
println "x is less than y"
#===========================================
# Factorial program
result = 1
iterations = 5
print "the facorital of "
print iterations
# Loop to calculate factorial
while iterations > 0
result = result * iterations
iterations = iterations - 1
print " = "
println result
#===========================================
# Evaluate Experessions program
5 + 3
2 * 3
5 + 3 * 2
( 5 + 3 ) * 2
5 > 3
5 > 3 && 10 < 20
5 > 10 || 3 < 5
( 5 > 3 ) && ( 10 < ( 2 + 2 ) )
5 > 3 && 10 < 20 || 4 == 4
5 || 3 * 2 == 6
x = 10
y = 20
z = x + y
ahmed = z + y / x
ahmed
5 ** 2 == 25
( 2 ** 3 | 7 ) == ahmed - 17