Baklava in Terra

Published on 03 October 2024 (Updated: 03 October 2024)

Welcome to the Baklava in Terra page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

local function strRepeat(n, s)
    local r = ""
    for i = 1, n do
        r = r .. s
    end

    return r
end

local function baklava()
    for i = -10, 10 do
        local numSpaces = i
        if i < 0 then
            numSpaces = -numSpaces
        end

        print(strRepeat(numSpaces, " ") .. strRepeat(21 - 2 * numSpaces, "*"))
    end
end

baklava()

Baklava in Terra was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.