I mean seriously, this is the question as I found it:
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”.
And here is an answer in bash that took me literally 30 seconds:
for num in {1..100} ; do
out=""
(( $num % 3 == 0 )) && out="Fizz"
(( $num % 5 == 0 )) && out="${out}Buzz"
echo ${out:-$num}
done
If this somehow provides valuable insight into a candidate, it certainly shouldn't be occupying prime 'in person' interview time. Request it before you schedule the on-site interview. Even identifying as a non-programmer, I have been asked much harder programming questions in interviews.