티스토리 뷰
let value = Int(readLine()!)!
for i in 1...value{
for _ in stride(from: value, to: i, by: -1){
print(" ", terminator: "")
}
for _ in stride(from: 0, to: i, by: 1){
print("*", terminator: "")
}
print("")
}
'Algorithm > noj.am' 카테고리의 다른 글
[Swift] 백준 10817 (0) | 2019.11.08 |
---|---|
[Swift] 백준 9498 (0) | 2019.11.08 |
[Swift] 백준 2742 (0) | 2019.11.08 |
[Swift] 백준 10998 (0) | 2019.11.07 |
[Swift] 백준 2947 (0) | 2019.11.07 |