Questions tagged [fizzbuzz]
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."
209 questions
5
votes
4
answers
377
views
Fizzbuzz in C sharp
I have been asked to implement this and completed that. There was also a request to apply the SOLID principles and use a CLEAN CODE approach.
Write a program that prints the numbers from 1 to 100. ...
1
vote
4
answers
284
views
Ruby FizzBuzz using the ternary operator two times
Task: Implement a function which loops from 1 to 100 and prints "Fizz" if the counter is divisible by 3. Prints "Buzz" if the counter is divisible by 5 and "FizzBuzz", ...
2
votes
3
answers
170
views
Standard fizz (3) buzz (5)
Is there a possibility to refactor this method and make it clean and respect solid principles.
...
13
votes
3
answers
2k
views
Sum of FizzBuzz numbers with modern C++
I am learning to write more modern C++, since my C++ is from the 1990s (I'm a C# programmer). I need to get used to the STL algorithms and such. So I tried some kata, summing up numbers in a given ...
4
votes
2
answers
177
views
yet another fizz buzz
FizzBuzz is a well known Exercise among programmers, but I wanted to add an aspect called "openClosed" principle (from SOLID)
FizzBuzz is a very simple programming task, used in software ...
2
votes
2
answers
1k
views
FizzBuzz in JavaScript (node.js), my first JavaScript program
I had just decided to learn JavaScript, so I wrote this program. I am sure you know what FizzBuzz is so I wouldn't describe it here.
Console output:
...
1
vote
1
answer
310
views
Fizzbuzz Solution - complexity, readability, performance, lines, obfuscation... - .sort()
The fizzbuzz challenge presents a lot of interesting questions for 'intermediate' programmers like myself. I have found that I don't actually know where to draw the line with, complex (hard to read ...
3
votes
2
answers
242
views
Branchless Fizbuzz in Posix C (no if-s, ternaries, switches or loops)
Yesterday when I was showering I was thinking of branchless programming and a thought occurred to me, whether it's possible to write a branchless solution of the Fizbuzz problem. The constraints I put ...
2
votes
1
answer
268
views
FizzBuzz JSON via Unix socket (Go)
At heart, this program is just the basic "FizzBuzz" program. However, the program was pushed further, by making it a client-server via Unix Socket:
Server run, and listening on a socket.
...
5
votes
3
answers
1k
views
FizzBuzz, but with provided start and end of sequence, results stored in array, and a separate function to convert integers to strings
To learn C, I'm doing the traditional FizzBuzz challenge with extra restrictions:
The start and end of sequence is provided by the user
Instead of directly printing the results, the results must be ...
4
votes
1
answer
247
views
FizzBuzz in Vyxal
I've created this code in the golfing language Vyxal to do FizzBuzz:
...
7
votes
3
answers
2k
views
Fizzbuzz in C lang
This is the first time I have recoded in C for several years and I would like to know how clean my code is.
...
2
votes
1
answer
303
views
FizzBuzz in arm64
I made a FizzBuzz program in arm64; I print out the values in hex instead of decimal. This was the first arm64 program I made and I'm looking for advice on how I can improve it.
The code to print out ...
0
votes
1
answer
394
views
Fizz Buzz function that returns an array [closed]
I am a newbie to JS and I am working on a FizzBuzz challenge. Below is what I have tried. Essentially when the function takes a value then it would iterate from 1 up to the value and an array would ...
2
votes
2
answers
249
views
Fizzbuzz questions - job interview rejected [closed]
I have done some programming tasks as a part of my candidacy for a web development apprenticeship. Unfortunately, my application was rejected as the hiring manager "didn't like my codes." I ...