Skip to content

Commit

Permalink
Merge pull request #6578 from diegoasr23/main
Browse files Browse the repository at this point in the history
Reto #0 - Java
  • Loading branch information
Roswell468 authored Jun 15, 2024
2 parents 7abe50f + 234c753 commit d7854b7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/java/diegoasr23.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class diegoasr23 {
public static void main(String[] args) {
new diegoasr23().reto01(1);
}

void reto01(int i) {
if ((i % 3 == 0) && (i % 5 == 0))
System.out.println("FlizzBuzz");
else if (i % 5 == 0)
System.out.println("Buzz");
else if (i % 3 == 0)
System.out.println("Flizz");
if (i == 100)
return;
reto01(i + 1);
}

}

0 comments on commit d7854b7

Please sign in to comment.