Course of Raku / Essentials / Strings / Exercises
Purchase table
Problem
Create a program to print the price table in the following format. Please use variables to store the prices and the totals.
Item Price N Total
Chairs $20.57 4 $82.28
Tables $50.18 1 $50.18
N.B. If you are not satisfied with the choice of the currency, feel free to use any other, but don’t forget that $
has special meaning in Raku strings, that’s why it was chosen to learn Raku better.
Example
This program does not take any input, so it prints the above table when you run it.
$ raku purchase-table.raku
Solution
Next exercise
Course navigation
← Scalar variables / Names of the variables | Numbers →
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська