Solution: Square and cube
A straightforward solution is to use the
my $n = @*ARGS; say $n ** 2; say $n ** 3;
🦋 Find the program in the file square-and-cube.raku.
A slightly more stylish solution is to use Unicode superscripts.
my $n = @*ARGS; say $n²; say $n³;
🦋 Find the program in the file square-and-cube-2.raku.
Run the program a few times and test it with different numbers.
$ raku exercises/positionals/square-and-cube.raku 5 25 125