Baklava in Odin

Published on 23 December 2024 (Updated: 23 December 2024)

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

Current Solution

package main;

import "core:fmt"
import "core:strings"

main :: proc() {
    for i := -10; i <= 10; i += 1 {
        num_spaces := abs(i)
        num_stars := 21 - 2 * num_spaces
        spaces, _ := strings.repeat(" ", num_spaces)
        stars, _ := strings.repeat("*", num_stars)
        fmt.println(strings.concatenate({spaces, stars}))
    }
}

Baklava in Odin 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.