Skip to content
This repository

Kata del mes de Marzo del 2011: FizzBuzz

branch: master
Octocat-spinner-32 JaviSoto Fix repo April 13, 2011
Octocat-spinner-32 MuDestructor Fix repo April 13, 2011
Octocat-spinner-32 NachE Fix repo April 13, 2011
Octocat-spinner-32 RobertoCastillo Fix repo April 13, 2011
Octocat-spinner-32 Sivainvi Fix repo April 13, 2011
Octocat-spinner-32 aabilio Fix repo April 13, 2011
Octocat-spinner-32 aesptux Fix repo April 13, 2011
Octocat-spinner-32 agutierrez Fix repo April 13, 2011
Octocat-spinner-32 aitortxu Fix repo April 13, 2011
Octocat-spinner-32 albertoperdomo_setepo Fix repo April 13, 2011
Octocat-spinner-32 alejandroSuch Fix repo April 13, 2011
Octocat-spinner-32 alejandrogomez kata finished. June 20, 2011
Octocat-spinner-32 alex952 Kata FizzBuzz April 25, 2011
Octocat-spinner-32 amaneiro Fix repo April 13, 2011
Octocat-spinner-32 amedio Fix repo April 13, 2011
Octocat-spinner-32 amuino Fix repo April 13, 2011
Octocat-spinner-32 animalaes Fix repo April 13, 2011
Octocat-spinner-32 armenta-angel Versión Mavenizada October 11, 2011
Octocat-spinner-32 arturoherrero Fix repo April 13, 2011
Octocat-spinner-32 athilha Fix repo April 13, 2011
Octocat-spinner-32 caic Fix repo April 13, 2011
Octocat-spinner-32 carlop Fix repo April 13, 2011
Octocat-spinner-32 cchau Added fizzBuzz.c written in C April 25, 2011
Octocat-spinner-32 cibernox My version July 17, 2011
Octocat-spinner-32 davidag Fix repo April 13, 2011
Octocat-spinner-32 diegoguevara Fix repo April 13, 2011
Octocat-spinner-32 discolo Fix repo April 13, 2011
Octocat-spinner-32 dobeslao Fix repo April 13, 2011
Octocat-spinner-32 dojosegovia Fix repo April 13, 2011
Octocat-spinner-32 drodriguez Fix repo April 13, 2011
Octocat-spinner-32 eamodeorubio Fix repo April 13, 2011
Octocat-spinner-32 eferro Fix repo April 13, 2011
Octocat-spinner-32 erpheus Ruby solution April 13, 2011
Octocat-spinner-32 funflin Stage 2 and change code style to Symfony2 September 27, 2011
Octocat-spinner-32 germandz Fix repo April 13, 2011
Octocat-spinner-32 ggalmazor Fix repo April 13, 2011
Octocat-spinner-32 gonzalo123 Fix repo April 13, 2011
Octocat-spinner-32 harad Fix repo April 13, 2011
Octocat-spinner-32 hisie Fix repo April 13, 2011
Octocat-spinner-32 ialcazar Fix repo April 13, 2011
Octocat-spinner-32 j2sg Fix repo April 13, 2011
Octocat-spinner-32 jacegu print to a 100 as expected May 17, 2011
Octocat-spinner-32 japaz Fix repo April 13, 2011
Octocat-spinner-32 jcorbacho Agrego ejemplo en python tomado de otros autores April 13, 2011
Octocat-spinner-32 jgarciagarrido Fix repo April 13, 2011
Octocat-spinner-32 jjfalcon Fix repo April 13, 2011
Octocat-spinner-32 jjuarez Fix repo April 13, 2011
Octocat-spinner-32 jknito Fix repo April 13, 2011
Octocat-spinner-32 jlopez Fix repo April 13, 2011
Octocat-spinner-32 jmbeas Fix repo April 13, 2011
Octocat-spinner-32 jmfranco Fix repo April 13, 2011
Octocat-spinner-32 jneira Fix repo April 13, 2011
Octocat-spinner-32 josmas Fix repo April 13, 2011
Octocat-spinner-32 jrdi fizzbuzz implemented on ruby January 05, 2012
Octocat-spinner-32 karlosgliberal Fix repo April 13, 2011
Octocat-spinner-32 kuraime Fix repo April 13, 2011
Octocat-spinner-32 lantoli Fix repo April 13, 2011
Octocat-spinner-32 maid450 Fix repo April 13, 2011
Octocat-spinner-32 manute Kata In Java December 03, 2011
Octocat-spinner-32 mgryszko Fix repo April 13, 2011
Octocat-spinner-32 nacmartin Fix repo April 13, 2011
Octocat-spinner-32 oscarramosp Stage 2 y pruebas de impresión finales April 08, 2012
Octocat-spinner-32 pacoguzman Fix repo April 13, 2011
Octocat-spinner-32 pereta segunda parte April 12, 2011
Octocat-spinner-32 porras Fix repo April 13, 2011
Octocat-spinner-32 prietopa Mes de marzo completado September 21, 2011
Octocat-spinner-32 rmhdev Fix repo April 13, 2011
Octocat-spinner-32 robjperez Fix repo April 13, 2011
Octocat-spinner-32 rsister88 Fix repo April 13, 2011
Octocat-spinner-32 sergiogragera Fix repo April 13, 2011
Octocat-spinner-32 sortega Fix repo April 13, 2011
Octocat-spinner-32 sourcerebels Fix repo April 13, 2011
Octocat-spinner-32 terrex Fix repo April 13, 2011
Octocat-spinner-32 theom3ga Fix repo April 13, 2011
Octocat-spinner-32 titosemi Fix repo April 13, 2011
Octocat-spinner-32 txingo Fix repo April 13, 2011
Octocat-spinner-32 vicentereig Fix repo April 13, 2011
Octocat-spinner-32 README Fix repo April 13, 2011
README
Imagine the scene. You are eleven years old, and in the five minutes before the end of the lesson, your Maths teacher decides he should make his class more "fun" by introducing a "game". He explains that he is going to point at each pupil in turn and ask them to say the next number in sequence, starting from one. The "fun" part is that if the number is divisible by three, you instead say "Fizz" and if it is divisible by five you say "Buzz". So now your maths teacher is pointing at all of your classmates in turn, and they happily shout "one!", "two!", "Fizz!", "four!", "Buzz!"... until he very deliberately points at you, fixing you with a steely gaze... time stands still, your mouth dries up, your palms become sweatier and sweatier until you finally manage to croak "Fizz!". Doom is avoided, and the pointing finger moves on.

So of course in order to avoid embarassment infront of your whole class, you have to get the full list printed out so you know what to say. Your class has about 33 pupils and he might go round three times before the bell rings for breaktime. Next maths lesson is on Thursday. Get coding!

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz?".

Sample output:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
... etc up to 100
Stage 2 - new requirements

 * A number is fizz if it is divisible by 3 or if it has a 3 in it
 * A number is buzz if it is divisible by 5 or if it has a 5 in it

----------------------------------------------------------------------------

Enlace con la información original: http://www.codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz
Something went wrong with that request. Please try again.