Course of Raku / Essentials / Control flow essentials / Loops / Exercises
Digital stairs
Problem
Create a program that prints the following structure:
1
12
123
1234
The user must enter the size of the stairs (which does not exceed 9).
Example
An example of using this program with the input value
3:
$ raku digital-stairs.raku
Enter the size: 3
1
12
123Solution
Course navigation
← Solution: FizzBuzz in a loop | Solution: Digital stairs →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська