Learnixo
Challenges

FizzBuzz with LINQ

beginner 50 XP

Problem

Return a list of strings from 1 to n where multiples of 3 are 'Fizz', multiples of 5 are 'Buzz', and multiples of both are 'FizzBuzz'. Implement using LINQ.

Test Cases

First 5 numbers
Input: 5
Expected: ["1","2","Fizz","4","Buzz"]
First 15 numbers
Input: 15
Expected: ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]

Hints

AI Assistance