-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from joaquin-rivero/main
Reto #0 - Kotlin
- Loading branch information
Showing
4 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
14 changes: 0 additions & 14 deletions
14
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/dart/bushi.dart
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/dart/joaquin-rivero.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
void main() { | ||
_fizzbuzz(); | ||
} | ||
|
||
void _fizzbuzz() { | ||
for (var i = 1; i <= 100; i++) { | ||
if (i % 3 == 0 && i % 5 == 0) { | ||
print("fizzbuzz\n"); | ||
} | ||
else if (i % 3 == 0) { | ||
print("fizz\n"); | ||
} | ||
else if (i % 5 == 0) { | ||
print("buzz\n"); | ||
} else { | ||
print("$i\n"); | ||
} | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/kotlin/bushi.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/kotlin/joaquin-rivero.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
fun main() { | ||
fizzbuzz() | ||
} | ||
|
||
private fun fizzbuzz() { | ||
for (i in 1..100) { | ||
if (i % 3 == 0 && i % 5 == 0) { | ||
println("fizzbuzz") | ||
} else if (i % 3 == 0) { | ||
println("fizz") | ||
} else if (i % 5 == 0) { | ||
println("buzz") | ||
} else { | ||
println(i) | ||
} | ||
} | ||
} |