Rust Taskbook Level 4.6
Задание 1
Given a string, check that this string consists only of numbers.
Задание 2
Given a vector:
rustvec![1, 0, 2, 3, 0, 5]
Remove all zeros from the vector:
rust[1, 2, 3, 5]
Задание 3
Given a vector:
rustlet vct: Vec<i16> = Vec::new();
Write code that will fill this vector with powers of two to the nth power:
rust[2, 4, 8, 16, 32]
Задание 4
Given an integer:
rustlet num: u16 = 12345;
Get the first even digit from the end of this number.
Задание 5
Write a program that will generate the following string:
rust"54321"
Задание 6
Given an array of integers:
rustlet arr = [123, 102, 345, 350];
Write into the new vector those numbers that contain the digit zero.
Задание 7
Given a line:
rust"abcdef"
Get every second character of this string:
rust"acf"