Course of Raku / Essentials / Positional data types / Exercises

Months names

Problem

Create a program that converts an integer number between 1 and 12 to a name of the month. The number is read from the command line. The result is printed to the console.

Example

Here is an example of running the program:

$ raku months-names.raku 5
May

Solution

See the solution

Next exercise

💪 Odd indices

Course navigation

Typed variables / Allomorphs   |   Associative data types