Курс языка программирования Raku / Основы / Больше о типах / Ассоциативные типы данных / Exercises
Повышение зарплаты
Problem
Given a hash with the data of an employee:
my %employee =
full-name => 'Eliza Vents',
department => 'Sales',
salary => 3000;Increase the salary by 5 % and print it together with the employee’s
name. Make sure the %employee hash keeps correct values
after the raise.
Example
Here is the expected output of the program:
$ raku salary-raise.raku
New salary of Eliza Vents: 3150Solution
Навигация по курсу
← Тест: Интерполяция словарей | Решение: Повышение зарплаты →