Course of Raku / Essentials / Typed variables / Exercises

Examine the result of prompt — Numbers

Task

Modify the program from the previous exercise. This time, it should ask to enter a number. Examine the type of the value returned by prompt. Run the program a few times and enter the numbers of different types (integers, rationals, and floating-point numbers).

Solution

See the solution

Course navigation

Data type conversion / Converting types with prefix operators   |   Positional data types