Skip to main content

FizzBuzz Problem

Hello guys, today I'm discussing about a well-known interview question, asked for logic measurement of a backend developer in many IT company.
fun fact: This is discussed in Stackoverflow's Annual Survey 2019.


Fizz Buzz Problem 

Problem statement: Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”

PS: I'm using javascript to solve this problem

Solution:

This is really simple, but tricky question if you don't pay attention.
Happy Codding.

Comments

Popular among the Blog

Arrange Marriage = Online Shopping

Headless Browsing and UI testing Automation : A nightmare