Rust Taskbook Level 5.2
Задание 1
Ask the user to enter 10 numbers via the console. Fill the array with these numbers.
Задание 2
Given an array:
rustlet arr: [[i8; 3]; 3] = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];
Find the sum of the elements of this array.
Задание 3
Given an array of integers:
rustlet arr = [100, 200, 300, 400, 500];
Write into a vector the elements of this array whose first digit is equal to 1 or 2.
Задание 4
Given an array of integers:
rustint arr = [123, 987, 345, 567];
Get the second element, which contains the digit 3:
rust345
Задание 5
The following motorcade was given:
rustlet tpl = (2025, 12, 31);
Print the data of this tuple as the following string:
rust"2025-12-31"
Задание 6
Write a program that will output the following pyramid to the console:
1
22
333
4444
55555
666666
7777777
88888888
999999999
22
333
4444
55555
666666
7777777
88888888
999999999