Rust Taskbook Level 2.1

Задание 1

Explain the difference between the loop loop and the while loop.

Задание 2

Given an array of integers:

rustlet arr = [1, 2, 3, 4, 5];

Print to the console the number of elements in this array.

Задание 3

Given an array of integers:

rustlet arr = [1, 2, 3, 4, 5];

Print the elements of this array to the console.

Задание 4

Given an array of strings:

rustlet arr = ["123", "456", "789"];

Print the first characters of each element of this array to the console.

Задание 5

Given some integer:

rustlet num: u16 = 12345;

Find the sum of all its even digits.

Задание 6

Given some integer:

rustlet num: u8 = 12;

Find the factorial of this number.