📜  01: Fizz Buzz](. 03-算法 01-fizz-buzz - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:05.304000             🧑  作者: Mango

代码示例2
for num in number {
  if num % 15 == 0 {
    print("\(num) fizz buzz")
  } else if num % 3 == 0 {
    print("\(num) fizz")
  } else if num % 5 == 0 {
    print("\(num) buzz")
  } else {
    print(num)
  }
}