Ex Fizz Buzz
Description
A classic exercise. The game its simple:
- You need to ask a number to the user
- If the number is divisible by 3 you should output "Fizz";
- If number divisible by 5 you should output "Buzz";
- If the number is divisible by 3 and 5 you should output "FizzBuzz";
- If the number is not divisible by any of the numbers returns the number;
Example
Input - 1
Output - 1
Input - 9
Output - Fizz
Input - 10
Output - Buzz
Input - 15
Output - FizzBuzz
More Challenging
- Print all numbers before the one entered by the user, using Fizz Buzz logic;