You are viewing a single comment's thread. Return to all comments →
Mine was very similar, only real difference is that my for loop is ready for Swift 3...
var n = Int(readLine()!)! for i in 1...n { var row = "" let spaces = n-i let hashes = n-spaces row += String(count: spaces, repeatedValue: Character(" ")) row += String(count: hashes, repeatedValue: Character("#")) print(row) }
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 →
Mine was very similar, only real difference is that my for loop is ready for Swift 3...