A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Baklava in Pineapple page! Here, you'll find the source code for this program as well as a description of how the program works.
def (this String).repeat(times Number) -> String
let i mutable = times
let s mutable = ""
while i > 0
s = "$(s)$(this)"
i = i - 1
return s
def .main
let i mutable = -10
while i <= 10
let numSpaces mutable = i
if numSpaces < 0
numSpaces = -numSpaces
let spaces = " ".repeat(numSpaces)
let stars = "*".repeat(21 - (2 * numSpaces))
"$(spaces)$(stars)".show
i = i + 1
Baklava in Pineapple was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.