Skip to content

Commit eb62cfd

Browse files
authored
Merge pull request #13 from Open-Splice/Test
Fixed calculator Example
2 parents 5e758f0 + e366e31 commit eb62cfd

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

examples/calculator/calc_test.spl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
func calculator(num1, num2, op) {
22
if (op == "+") {
33
print(num1 + num2);
4-
}
5-
if (op == "-") {
4+
} else if (op == "-") {
65
print(num1 - num2);
76
}
87
}
98

109
calculator(5, 3, "+");
11-
calculator(5, 3, "-");
10+
calculator(5, 6, "-");

examples/calculator/hello.spc

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)