Skip to content

Commit

Permalink
Add Baklava in Io (#4155)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzuckerm authored Jan 1, 2025
1 parent c90151a commit 1b07781
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions archive/i/io/Baklava.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
baklavaLine := method(n,
num_spaces := n abs
num_stars := 21 - (2 * num_spaces)
(" " repeated(num_spaces)) .. ("*" repeated(num_stars))
)

for(n, -10, 10, baklavaLine(n) println)

0 comments on commit 1b07781

Please sign in to comment.