Rust Taskbook Level 4.7

Задание 1

Given a vector of integers:

rustlet vct = !vec[123, 456, 789];

Check that it contains a number that contains the digit 3.

Задание 2

Two vectors are given:

rustlet vct1 = vec![1, 2, 3, 4, 5];
let vct2 = vec![4, 5, 6, 7, 8];

Write into the new vector the elements that are in both the first and second vectors.

Задание 3

Given a vector with rows containing integers as rows:

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

Find the sum of the elements of this vector.

Задание 4

Given a string:

rust"AbCdE"

Change the case of the letters in this line to the opposite. In our case, it should look like this:

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

Write a program that will generate the following string:

rust"-1-2-3-4-5-"
Задание 6

The date is given in the following format:

rust "31-12-2025"

Convert it to the following format:

rust"31 December 2025"