You are viewing a single comment's thread. Return to all comments →
This is pretty elegant. And I've created a monster:
var array = Array(arrayLiteral: space) for i in 1...n-1{ array.append(" ") } array[n - 1] = "#" for i in 1...n{ array[n - i] = "#" var string = array.joinWithSeparator("") print(string) }
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
This is pretty elegant. And I've created a monster: