FizzBuzz is described as:
Write a program that prints the integers 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"
It takes a couple of minutes to write a few lines of C++ code that satisfy the requirements:
But then the examiner may ask you to add some more checks, such as printing a different string when the number is a multiple of 11 or any other number, and the code quickly becomes ugly. In fact, the major mistake that you can make with FizzBuzz is using the wrong sequence of checks, for example checking for modulus of 3 before that of 15, so that FizzBuzz is never printed; this is obvious with only 3 simple checks, but gets more complicated with a longer list of more complicated checks.
So why not spend a few minutes more than those required to write a trivial solution, and propose a fully object-oriented solution that is designed for extensibility?