Talk:FizzBuzz

From Rosetta Code
Revision as of 21:03, 11 December 2007 by rosettacode>Mwn3d (New section: Puzzle talk)

FizzBuzzJazz=

I wasn't satisfied with the approach most of the languages were taking, so I added a second approach to PHP, that uses the concatenation operator. I almost added a third code example as an extension of the puzzle, to demonstrate the approach.

I wanted to add a third term, "Jazz", to appear on multiples of 7. So 7 would have been "Jazz", 21/42/84 would have been "FizzJazz", 35/70 would have been BuzzJazz, and 105 (if the loop were to get that far) would have been FizzBuzzJazz. The if-else ladder approach would have needed three additional if statements to accommodate, while the concatenation approach would have needed only one.

This is probably a good time to point out that FizzBuzz is classified as a puzzle; As the header template suggests, "Multiple approaches are not discouraged." So if you've got a better way to solve the problem for a given language, let's see it! --Short Circuit 13:24, 31 October 2007 (MDT)

Puzzle talk

Why was this taken out of the puzzle category? As far as I can tell....it is a puzzle. Besides that, if it's not a puzzle, then what is it? --Mwn3d 14:03, 11 December 2007 (MST)