← 都来码 / Dolaima← 例程索引swift/school/99_bottles.swift 原文

swift/school/99_bottles.swift · 226 字节 · 下载原文

for i in (1...99).reversed() {
	print("\(i) bottles of beer on the wall, \(i) bottles of beer.")
	let next = i == 1 ? "no" : (i-1).description
	print("Take one down and pass it around, \(next) bottles of beer on the wall.")
}