Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program that prints numbers from 1 to 100, replacing multiples of 3 with "Fizz," multiples of 5 with "Buzz," and multiples of both with "FizzBuzz."

Easy

Problem Statement

Write a program that prints numbers from 1 to 100, replacing multiples of 3 with "Fizz," multiples of 5 with "Buzz," and multiples of both with "FizzBuzz."

Sample Input

1 to 100

Sample Output

1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Your logic here
Log in or sign up to run or submit your code.Log inSign up
Input
1 to 100
Expected Output
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz