RosettaCodeData/Task/FizzBuzz/Kotlin/fizzbuzz-4.kotlin

4 lines
130 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
fun fizzBuzz() {
2020-02-17 23:21:07 -08:00
(1..100).forEach { println(mapOf(0 to it, it % 3 to "Fizz", it % 5 to "Buzz", it % 15 to "FizzBuzz")[0]) }
2019-09-12 10:33:56 -07:00
}