Rust Taskbook Level 4.3

Задание 1

Given a string of letters and numbers, get the position of the penultimate digit in this string.

Задание 2

Print to the console all numbers in the range from 10 to 1000, whose second-to-last digit is even.

Задание 3

Given a vector:

rustlet vct = vec![1, 2, 3, 4, 5];

Print the elements of this vector to the console in reverse order.

Задание 4

Write a program that will generate the following string:

rust"123456789"
Задание 5

Given a string of integers separated by spaces:

rustlet txt: &str = "123 456 789";

Find the sum of the numbers in this line.

Задание 6

There is a line with the words:

rustlet txt: &str = "word1 word2 word3";

Get the first N words from this string as a word vector.

Задание 7

Given an integer:

rustlet num: u16 = 12345;

Get an array of the number's characters in reverse:

rust['5', '4', '3', '2', '1']