A programming challenge, popularized by Jeff Atwood, that prints the numbers from 1 to 100, where multiples of three print "Fizz," multiples of five print "Buzz," and multiples of both three and five print "FizzBuzz."

learn more… | top users | synonyms

3
votes
2answers
34 views

Reducing memory usage for FizzBuzz in R

I've been trying all night to get my fizzbuzz to use below 20 MB of RAM but I can't seem to get it much smaller than this. ...
6
votes
1answer
57 views

General Fizzbuzz

I'm learning Rust now and created a program to solve the task General Fizzbuzz on Rosetta Code. For example, given: 20 3 Fizz 5 Buzz 7 Baxx where the first line ...
4
votes
2answers
38 views

FizzBuzz Kickoff

My first FizzBuzz question (well, I asked, then deleted, one previously), and my very first VB.NET question. ...
3
votes
3answers
99 views

Java FizzString

I am testing what knowledge I have with the FizzBuzz tests in Java. This is the one I just completed: Given a string str, if the string starts with "f" return "Fizz". If the string ends with "b" ...
3
votes
2answers
81 views

Improving the efficiency of my FizzBuzz algorithm [closed]

I worked on an exercise from codewars, which is a variation of the popular fizzbuzz game. (If the link doesn't work, you may need to reload the page.) In this variation, I'm supposed to find the sum ...
5
votes
1answer
107 views

Fizzbuzz in Python

I'm new to Python and wondering what can be improved with the following super novice program - in terms of the solution and code style etc. test_fizzbuzz.py ...
8
votes
2answers
94 views

FizzBuzz Challenge

This bit of code is a small game to see how long you play a game of FizzBuzz without messing up. Code: The top of the code: ...
3
votes
1answer
76 views

FizzBuzz from a file

This was found on CodeEval. Challenge: Write a program that prints out the final series of numbers where those divisible by X, Y and both are replaced by “F” for fizz, “B” for buzz and “FB” for fizz ...
3
votes
1answer
200 views

FizzBuzz-type program that reads/writes to Excel

I'm new to Groovy, and coming from PHP it's been a rough transition. The code below works. However, I would appreciate feedback on how better to write it and follow good practice with Groovy. I ...
15
votes
5answers
2k views

Linq me a FizzBuzz

I got this requirement recently: Write some code that prints out the following for a contiguous range of numbers: the number 'fizz' for numbers that are multiples of 3 'buzz' for numbers ...
8
votes
2answers
301 views

FizzBuzz from a casual rubyist

As a casual Rubyist I am mainly interested, how ideomatic my solution is. ...
15
votes
2answers
1k views

Writing FizzBuzz like this makes me feel like a small child

For the sake of full disclosure, this was written with bananas, not apples. The doctor may not be kept away. With AppleScript highlighting: For Copy&Pasting: ...
10
votes
1answer
76 views

Even more extensible and testable BuzzFizz

Inspired by Extensible and testable FizzBuzz I have decided to write my own implementation, partially based on my own answer and on the other answers. First a warning to all of you: Never make such ...
28
votes
7answers
2k views

Who's in the fellowship? When are Frodo, and the rest of the gang, together

As a variant on the fizzbuzz concept, and as an exercise for learning JavaScript, HTML5, and CSS (I know none of them very well). The regular fizzbuzz is somewhat tired, but having a web-based, ...
15
votes
4answers
969 views

Extensible and testable FizzBuzz

There seem no end to fizzbuzz implementations. Something I rarely see is an implementation that's easy to extend with more name-divisor pairs. Another thing that usually annoys me is the lack of ...
0
votes
2answers
88 views

FizzBuzz Solution Rags to Different Rags [closed]

I took some code and reviewed it, but it got me thinking, so I re wrote the code a little bit and would like to ask what you think of it and why it's bad to do this, even though it works. ...
11
votes
10answers
1k views

FizzBuzz Problem Solution

I wrote this simple solution about FizzBuzz. Is there any possible way to solve or optimize the solution, such as with bitwise tricks? ...
14
votes
2answers
697 views

FizzBuzz example in Python for game manual

I'm developing an implementation of the FizzBuzz game as part of an edutainment game for a retro video game platform. In its manual, I want to mention the history of writing a bot for the FizzBuzz ...
10
votes
8answers
1k views

FizzBuzz using switches

I'm learning about control structures now, and I want to see if I'm doing this as cleanly and efficiently as possible. Seems like there should be a less... verbose way of writing the ...
5
votes
1answer
179 views

The Functional FizzBuzz Kata

I run a coding dojo at work. For one session I'm to showing that you can use a kata to get into a new language. I'm using the FizzBuzz Kata to to show F# (and JavaScript) because it is short. The ...
8
votes
2answers
525 views

The Scripted FizzBuzz Kata

I run a coding dojo at work. for one session I'm to showing that you can use a kata to get into a new language. I'm using the FizzBuzz Kata to show JavaScript (and F#) because it is short. The ...
7
votes
2answers
376 views

FizzBuzz with user input variables

Yes, another FizzBuzz! I know you guys may be tired of these but I think it's a tradition stepping stone for beginners on this site. Here are some notes on my thinking: I tried to keep it as ...
10
votes
3answers
118 views

FizzBuzz vs. FortRan

In keeping with using FizzBuzz as an introduction to a language, I present FizzBuzz with a Fortran95 twist: For multiples of 3, print Fort, and for 5's multiples ...
2
votes
2answers
126 views

Fizz Buzz in JS

This is a simple JavaScript Fizz Buzz solution based on a Codecademy exercise. I refactored it down a few lines after seeing these implementations. I wanted to post here and see what else I can ...
8
votes
3answers
962 views

Simple FizzBuzz

I wanted to try FizzBuzz, but to do it in the most efficient way. I think this method employs most of the concepts I learned here. Is there anything unaccounted for? A sprinkle of Swing since that's ...
6
votes
1answer
81 views

Wrapping JS file in function, and assigning that function to a variable

I've been reading about wrapping JS files in functions to call them on load, etc. I also was looking at namespaces and how to avoid collisions with functions/objects/variables of the same name. What ...
63
votes
3answers
5k views

Down with FizzBuzz… LOL

This post is the result of reading through and following the LOLCODE Specification 1.2 ("smoking the manual", right?), and writing and executing my code on compileonline.com. My "hello world" was ...
31
votes
9answers
3k views

Which FizzBuzz is better, and why?

I was in an interview and the guy asked me to do the typical FizzBuzz question of printing numbers 1-100, but for each factor of 3 print Fizz, each factor of 5 print Buzz, and each factor of both ...
6
votes
2answers
157 views

Basic Imitation of C# Enumerable in VBA - or any other static class

Since implementing static classes in VBA actually seems possible I came up with an idea to try to imitate C#' Enumerable class (well, to some extent...). This is ...
8
votes
2answers
136 views

No more Fizzbuzz. How about Hello World instead?

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 ...
10
votes
1answer
124 views

Object-Oriented FizzBuzz in Ruby

I don't use Ruby on a regular basis, but I felt inspired to write an extensible, object-oriented version of FizzBuzz to sharpen my skills. I welcome all feedback. The main class: ...
1
vote
1answer
36 views

Ways to express proc inside a method

I'm interested in seeing different ways the proc can be expressed inside a method that takes args. This method is meant to be a sort of FizzBuzz that will dynamically replace "Fizz" or "Buzz" as well ...
28
votes
2answers
2k views

Tired of FizzBuzz yet?

There have been many FizzBuzz questions lately, and here is one more! Granted, it is pretty straightforward to do FizzBuzz with SQL using calculations. So instead, I'm going to do a FizzBuzz which ...
36
votes
1answer
2k views

FizzBuzz in Brainfuck

Inspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck. The code is entirely my own, except for the inclusion of the Printing a ...
8
votes
2answers
91 views

FizzBuzz in SQLite 2

This query performs a FizzBuzz in SQLite 2.8.17 without creating any tables or sprocs. First attempt: ...
7
votes
1answer
94 views

Multi-process FizzBuzz in Elixir

So I was playing with writing FizzBuzz in Elixir; this is my first, naive implementation: ...
15
votes
5answers
2k views

FizzBuzz in Ruby

I have this implementation of the FizzBuzz challenge in Ruby: ...
15
votes
2answers
367 views

FizzBuzz in Commodore Basic

...
12
votes
3answers
204 views

Haskell FizzBuzz with a type system

The core problem is simple enough, but I've developed a type system that I'm not sure about. The intention is, if the result is a number, calling ...
10
votes
2answers
116 views

VBuzz all fizzed up

I don't normally write vb.net code, and I would rather maintain a monstruous vb6 project than a simple vb.net one. There's something about fizzbuzz going on this weekend, that pushed me to write ...
6
votes
4answers
161 views

FizzBuzz - officially now in CLISP

I had to jump on the bandwagon for this one. The task does a great job of helping you learn a language you're unfamiliar with. So today I present you with my version of the infamous FizzBuzz game in ...
7
votes
3answers
207 views

Enterprise FizzBuzz in C++11

I've decided to write a C++ FizzBuzz with the focus on some new C++11 features, ridiculous optimizations and unit-testability. Are there improvement possibilities in those regards? ...
22
votes
1answer
635 views

16-bit FizzBuzz in x86 NASM assembly

Since this problem involves small numbers (particularly with a small loop count of 100), it's possible to ease the modulo operation setup by simply working with 16-bit and 8-bit registers: ...
13
votes
2answers
470 views

FizzBuzz in SQL--no loops

MS SQL Server, no loops. ;) ...
14
votes
1answer
360 views

Yet another FizzBuzz

Since today is apparently a good day for...unlikely FizzBuzz implementations, I decided to contribute another, this one in C++: ...
7
votes
5answers
1k views

FizzBuzz in Objective-C

In my quest for learning Objective-C, I have created the common FizzBuzz code in it. This is due to a suggestion/challenge from @nhgrif to re-implement anything he does in Swift in Objective-C. ...
18
votes
1answer
369 views

FizzBuzz in Forth

There are quite a large number of existing implementatons of FizzBuzz but I awoke this morning in a cold sweat with the terrible revelation that Code Review had no FizzBuzz implementation in Forth! ...
27
votes
8answers
3k views

The FizzBuzz challenge in Java 8 written in a short, readable and interesting way

I decided to take on the FizzBuzz challenge with as twist that I would use Java 8 concepts to make it a bit modular, yet still let it be a short, readable and understandable program. This in contrary ...
17
votes
6answers
1k views

Is this FizzBuzz Swift-y?

...
19
votes
3answers
1k views

FizzBuzz implementation using the ternary operator

This is my first time writing JAVA, and I'm trying to start off on the right track. Using my C++ knowledge, I was able to understand the syntax for the ternary operator, but I'm not sure how it ...