Baklava in Sather

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

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

Current Solution

class BAKLAVA is
  main is
    i:INT := -10;
    loop while!(i <= 10);
      numSpaces:INT := i;
      if (numSpaces < 0) then
        numSpaces := -numSpaces;
      end;

      #OUT + strRepeat(numSpaces, " ") + strRepeat(21 - 2 * numSpaces, "*") +"\n";
      i := i + 1;
    end;
  end;

  strRepeat(n:INT, s:STR):STR is
    r:STR := "";
    loop n.times!;
        r := r + s;
    end;

    return r;
  end;
end;

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