Skip to main content
Skip to content

Loops & Patterns · Beginner

FizzBuzz in Hindi: Desi FizzBuzz Program

Demonstrates modulo operators, nested agar-warna conditionals, and loops.

The program

Edit anything and press Run. The output below was produced by running this exact code.

Expected output

Press Run to try it

--- Desi FizzBuzz (1-15) ---123 -> DesiFizz ⚡45 -> DesiBuzz 🚀6 -> DesiFizz ⚡789 -> DesiFizz ⚡10 -> DesiBuzz 🚀1112 -> DesiFizz ⚡131415 -> DesiFizzBuzz! 🎉

How it works

FizzBuzz is the classic interview warm-up: count from 1 to 15, but replace multiples of 3 with one word, multiples of 5 with another, and multiples of both with a third.

The chalo loop counts i from 1 to 15. Inside, i % 3 == 0 asks whether i divides by 3 with nothing left over. The order of the checks matters — the both-case (&&) has to come first, because 15 is also a multiple of 3 and would otherwise stop at the second branch.

Anything that is not a multiple of 3 or 5 falls through to the final warna and is printed as a plain number.