Course of Raku / Essentials / Control flow essentials / Conditional checks / Exercises

FizzBuzz

Problem

Here is a simplified version of the standard FizzBuzz problem.

Create a program that asks to enter a positive integer number and prints:

  • Fizz if the number is divisible by 3.
  • Buzz if the number is divisible by 5.

Example

When you run the program, it prompts to enter a number, and then prints the result.

$ raku fizz-buzz.raku
Enter a number: 10
Buzz

Solution

See the solution

Course navigation

Solution: Plural ending   |   Solution: FizzBuzz

Translations of this page: EnglishDeutschEspañolItalianoLatviešuNederlandsБългарскиРусскийУкраїнська