- Start at the number 1
- Count upwards by 1 each turn
- If the number that turn is a multiple of 3 then replace the number with the word Fizz
- If the number that is a multiple of 5 then replace the number with the word Buzz
- Finally, if the number is a multiple of both 3 and 5 then replace the number with the combination of the two words: FizzBuzz
tomtomnicholls
Tuesday, 5 August 2014
Classic Programming Problem: FizzBuzz
Designing a program to model the FizzBuzz word game is often used to test a person's programming knowledge. Here are the game's basic rules:
Friday, 17 June 2011
Subscribe to:
Posts (Atom)