All challenges
easyloops 10 XP per passing test

FizzBuzz

Problem

Given an integer n, print the numbers from 1 to n. But for multiples of 3, print 'Fizz' instead of the number, and for multiples of 5, print 'Buzz'. For numbers which are multiples of both 3 and 5, print 'FizzBuzz'.
(run your code to see output)
Advertisement
Sponsored