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

4 lines
130 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
fun fizzBuzz() {
(1..100).forEach { println(mapOf(0 to it, it % 3 to "Fizz", it % 5 to "Buzz", it % 15 to "FizzBuzz")[0]) }
}