Course of Raku / Objects, I/O, and exceptions / Classes and objects / Subroutines vs methods / Exercises
Triple as a subroutine
Problem
Write a subroutine triple that returns
three times its argument. Call it with 7 and print the
result.
Example
The program prints:
21Solution
Course navigation
← Subroutines vs methods | Solution: Triple as a subroutine →