forked from mouredev/retos-programacion-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: se realiza el reto #0 el famoso Fizz Buzz con Java
- Loading branch information
1 parent
ed92c27
commit 5995fbe
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/java/dancorrdev.java
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,15 @@ | ||
public class dancorrdev { | ||
public static void main(String[] args) { | ||
for (int i = 1; i < 100; i++) { | ||
if (i % 3 == 0 && i % 5 == 0){ | ||
System.out.println("FIZZBUZZ"); | ||
} else if (i % 3 == 0) { | ||
System.out.println("FIZZ"); | ||
} else if (i % 5 == 0) { | ||
System.out.println("BUZZ"); | ||
}else { | ||
System.out.println(i); | ||
} | ||
} | ||
} | ||
} |