Rust Taskbook Level 4.9
Задание 1
Given a string of letters and numbers:
rustlet txt: &str = 'a1b2c345';
Please make sure that this line does not contain more than three letters.
Задание 2
Two numbers are given:
rustlet num1: u16 = 12;
let num2: u16 = 34;
Write the common divisors of these numbers into a new vector.
Задание 3
Given a vector:
rustlet vct: Vec<i16> = Vec::new();
Use a loop to fill this vector with random integers between 1 and 100.
Задание 4
Given a string:
rust"abcdefg"
Remove every third character from this line. In our case, we should get the following:
rust"abdeg"
Задание 5
Given an array with numbers of days of the week:
rustlet arr = [1, 2, 7];
Write the names of these months into a new array:
rust["Mon", "Tue", "Sun"]