Course of Raku / Essentials / Control flow essentials / Loops / Exercises

Echo until enough

Problem

Write a program that repeatedly asks to enter a word and prints it in the terminal. If the word is enough, the program terminates and prints a final message.

Example

The program may run infinitely long, but here we only show a couple of iterations.

$ raku echo-until-enough.raku
Your word: language
language
Your word: coding
coding
Your word: enough
OK, done.

Solution

✅ See the solution

Course navigation

← Solution: Fibonacci numbers   |   Solution: Echo until enough →