Course of Raku / Essentials / Loops / Exercises

Factorial

Problem

Create a program that computes the factorial of 8 using a loop and then prints it.

Example

The program’s behaviour is illustrated by this snippet:

$ raku factorial.raku
40320

Solution

See the solution

Next exercise

💪 Fibonacci numbers

Course navigation

Conditional checks / Ternary operator   |   Data type conversion

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