Course of Raku / Essentials / Positional data types / Exercises
The number of command-line arguments
Task
Write a program that reports how many arguments it received from the
command line in a complete sentence. Make the grammar correct: use the
word argument when exactly one was passed and
arguments in all other cases.
Example
This is how the program is supposed to react:
$ raku number-of-command-line-arguments.raku make them count us now
You passed 5 arguments.
$ raku number-of-command-line-arguments.raku solo
You passed 1 argument.Solution
Course navigation
← Solution: Traffic lights | Solution: The number of command-line arguments →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська