Fizz Buzz
Problem
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”
Example of sequence - 3,6,9,12,15,18,1,24,27.
Solution
Method 1- Brute force
Here we notice that that after 15, there is 18. So, we should increment the iterator by 2, and then 1 i.
[Read More]