Skip to content

Commit

Permalink
Merge pull request #1 from melegit/Reto-#0---Kotlin
Browse files Browse the repository at this point in the history
Reto #0 - Kotlin
  • Loading branch information
melegit authored Jan 2, 2023
2 parents e245161 + 009f7cf commit 9689218
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/kotlin/melegit.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fun main() {
(1..100).forEach { num ->
when {
num % 3 == 0 && num % 5 == 0 -> println("FizzBuzz")
num % 3 == 0 -> println("Fizz")
num % 5 == 0 -> println("Buzz")
else -> println(num)
}
println()
}
}

0 comments on commit 9689218

Please sign in to comment.