Exercise: Mutable Integers

In this exercise, we will mutate the values of two integers.

Problem Statement

In this problem, you have to update the value of two mutable integers, x and y. The value of x will be incremented by 5, whereas the value of y will be multiplied by 10.

Sample Input

x = 20, y = 3

Sample Output

x = 25, y = 30

Coding Challenge

Try to understand all the steps necessary to reach the final goal. This exercise isn’t too difficult, so it shouldn’t take long.

Remember, the x and y variables have already been defined as ref wrappers for the integer type. You will not be able to see them. All you have to do is modify the values wrapped inside them.

If you feel stuck, refer to the solution review for help.

Good luck!

Get hands-on with 1200+ tech skills courses.