Rust Taskbook Level 3.7

Задание 1

Given a string, capitalize the last letter of each word in this string.

Задание 2

Given a string, check that this string consists of only even digits.

Задание 3

Given an array of fractions:

rustlet arr: [f32; 5] = [1.456, 2.125, 3.32, 4.1, 5.34];

Round these fractions to one decimal place.

Задание 4

Given are integers separated by commas:

rustlet txt: &str = "12,34,56";

Find the sum of these numbers.

Задание 5

Given a certain number, for example, this one:

rustlet num: u16 = 123789;

Remove all odd digits from this number. In our case, we get the following result:

rust28
Задание 6

Given a number:

rustlet num: i16 = 12000;

Get a string consisting of zeros from the end of this number:

rust"000"