Sign in
Log inSign up

What would be your solution to the FizzBuzz problem?

Michael Bates's photo
Michael Bates
·Dec 11, 2016

To describe the FizzBuzz problem — one of the famous interview problems — in brief:

You have to 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”.

How would you approach when someone asks you a solution for the problem. Based on what you have learnt so far; if possible, surprise us with a cool answer! Use whatever programming language, you are comfortable with :D

Psst, this can also be an intro for us who are new to the syntax of your super cool language 👍🏻

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct