From 7f36737138f5bf1b6d2fbd16d0b4541038c9de5e Mon Sep 17 00:00:00 2001 From: matichanx3x3 Date: Wed, 24 Jul 2024 12:27:56 +0200 Subject: [PATCH] Reto #0 - c --- .../c/matichanx3x3.c" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/c/matichanx3x3.c" diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/c/matichanx3x3.c" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/c/matichanx3x3.c" new file mode 100644 index 0000000000..3c8119ab5a --- /dev/null +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/c/matichanx3x3.c" @@ -0,0 +1,23 @@ +#include + +int main(int argc, char const *argv[]) +{ + for (size_t i = 0; i <= 100; i++) + { + if (i % 3 == 0 && i% 5 == 0)//cuidar el orden de la comprobacion + { + printf("fizzbuzz \n"); + }else if (i%5 == 0) + { + printf("buzz \n"); + }else if (i % 3 == 0) + { + printf("fizz \n"); + }else{ + printf("%d\n",i); + + } + } + + return 0; +}