Pergunta de entrevista da empresa SQAsquared

Write a program that takes an integer as input and prints: the number, Foo when it is divisible by 3, Bar when it is divisible by 5, and FooBar when it is divisible by both 3 and 5.