From 234c75340a9948da91aecb267dac04b1b9495f42 Mon Sep 17 00:00:00 2001 From: diegoasr23 Date: Fri, 14 Jun 2024 22:51:39 -0400 Subject: [PATCH] Reto #0 - Java --- .../java/diegoasr23.java" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/java/diegoasr23.java" diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/java/diegoasr23.java" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/java/diegoasr23.java" new file mode 100644 index 0000000000..970e07175b --- /dev/null +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/java/diegoasr23.java" @@ -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); + } + +} \ No newline at end of file