By Alvaro "Krono" Gonzalez
https://alvarogonzalezferrer.github.io/
The "Fizz-Buzz test" is an interview question designed to help filter out the 99.5% of programming job candidates who can't seem to program their way out of a wet paper bag. The text of the programming assignment is as follows:
"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 both three and five print “FizzBuzz”."
Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes.
Want to know something scary ? – the majority of comp sci graduates can’t. I’ve also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.
I’m not saying these people can’t write good code, but to do so they’ll take a lot longer to ship it. And in a business environment that’s exactly what you don’t want.
This sort of question won’t identify great programmers, but it will identify the weak ones.
And that’s definitely a step in the right direction
More info:
https://en.wikipedia.org/wiki/Fizz_buzz/
This code is extra commented for educative purposes.
The code was tested with GNU GCC, but should compile with any standard C++ compiler
For Windows users, I recommend the great Embarcadero Dev-Cpp
https://www.embarcadero.com/free-tools/dev-cpp
Remember you can always send me some BTC to help with my work. Check my main page to find how how! Thanks!