Course of Raku / Essentials / Conditional checks / Exercises

Plural ending

Task

Write a program that asks the user for a positive integer number and then prints the phrase N files copied, where N is the entered number, and the word file is in the correct form: plural or singular.

Example

Here is an idea that the program must implement:

$ raku plural-endings.raku
How many files to copy? 15
15 files copied.

Solution

See the solution

Next exercise

💪 FizzBuzz

Course navigation

Code blocks / Local variables   |   Loops