Questions tagged [fizzbuzz]

a game, algorithm and a common programming task of replacing any number divisible by three with the word "fizz", and any number divisible by five with the word "buzz"

Fizzbuzz is a game used to teach children division. Implementing an algorithm for that game is sometimes used as an interview task.

https://en.wikipedia.org/wiki/Fizz_buzz

290 questions
-7
votes
8 answers

C++ Fizz Buzz alternative version

I'm relatively new to stack overflow (yes, i'm extremely new to coding), and i'm currently working on an altered version of the Fizz Buzz Question. Could someone help me figure out as to what i'm doing wrong? I can't seem to find the answer on Stack…
J Le
  • 1
  • 1
  • 2
-7
votes
7 answers

fizz buzz game in python

Write a simple function called fizzBuzz that takes in a positive integer, and returns ‘fizz’, ‘buzz’, ‘fizzbuzz’ or the argument it receives, based on the following: Returns ‘fizz’ if the argument is divisible by 3 Returns buzz if the argument is…
benlegendj
  • 1
  • 1
  • 2
-8
votes
1 answer

It says I need to add "," in C#, Where do I put it?

I tried to make a FizzBuzz code in C# but the error code it gives me is that I'm missing a " , " somewhere but I can't find where to place it Also I know there are other underlying programs in the code I just need this fixed so I can compile and fix…
-8
votes
3 answers

c++ fizzbuzz switch statement?

I'm trying to see if I can make a fizzbuzz c++ switch statement. I'm getting an error saying i is not usable in a const expression. Does that mean I can't make this thing work? Or is there a work around? Here's my code. #include using…
-9
votes
2 answers

What is the correct output for the FizzBuzz test in python?

I recently began python and I tried the FizzBuzz test. I came up with this: count = 0 while count <= 100: if (count % 3) == 0: print "Fizz" count = count + 1 elif (count % 5) == 0: print "Buzz" count = count + 1 elif (count %…
Kai
  • 9
  • 4
1 2 3
19
20