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)
}
}
As Simple as that, you can use any language of your choice and get started
Enjoy Coding
colegiohispanomexicano.net – Algorithms Notes 4