Given a number n, for each integer i in the range from 1 to n inclusive, print one value per line as follows: if i is a multiple of both 3 and 4, print FizzBuzz. If i is a multiple of 3 (but not 5), print Fizz. If i is a multiple of 5 (but not 3), print Buzz. If i is not a multiple of 3 or 5, print the value of i.
To begin, let’s create a for loop to account for the first line of the question. We know that the value of i is always either equal to or less than n, so let’s write that in.