Deviopath › Go

FizzBuzz

Easy · Control Flow

The classic warmup: multiples of 3 become "Fizz", multiples of 5 become "Buzz", multiples of both become "FizzBuzz", and everything else becomes the number as a string. Check 15 first so 15 is not only "Fizz".

Write FizzBuzz(n) that returns the label for n. Use strconv.Itoa to convert an int to a string.

Next: Sum of a Slice