Skip to content

Commit 31f6ee8

Browse files
authored
Add Baklava in Golo (#4172)
1 parent a7ded69 commit 31f6ee8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

archive/g/golo/baklava.golo

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module baklava
2+
3+
function main = |args| {
4+
for (var n = -10, n <= 10, n = n + 1) {
5+
let numSpaces = Math.abs(n)
6+
let numStars = 21 - 2 * numSpaces
7+
println(" " * numSpaces + "*" * numStars)
8+
}
9+
}

0 commit comments

Comments
 (0)