Skip to content

Commit

Permalink
Merge pull request #6625 from matichanx3x3/main
Browse files Browse the repository at this point in the history
Reto #0 - c
  • Loading branch information
Roswell468 authored Jul 25, 2024
2 parents ced4429 + 7f36737 commit 8577053
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/c/matichanx3x3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <stdio.h>

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;
}

0 comments on commit 8577053

Please sign in to comment.