Rust Taskbook Level 1.5

Задание 1

Tell me how many and what range of values ​​the type i16 can take.

Задание 2

Print to the console all numbers that are multiples of 7 in the range from -100 to 100.

Задание 3

Two integers are given:

rustlet num1: u16 = 12;
let num2: u16 = 13;

Check that the first digits of these numbers match.

Задание 4

Two integers are given:

rustlet num1: u16 = 36;
let num2: u16 = 12;

Check that the first number is divisible by the second without remainder.

Задание 5

Given a string:

rustlet txt: &str = "123456789";

Loop through and output to the console one by one all characters from the end of the line.

Задание 6

Three integers are given:

rustlet num1: u16 = 36;
let num2: u16 = 24;
let num2: u16 = 12;

Print the larger of these numbers to the console.

Задание 7

Three symbols are given:

rustlet chr1: char = 'a';
let chr2: char = 'b';
let chr3: char = 'c';

Merge these characters into a string:

ruststd::string "abc"
Задание 8

Given an integer containing the number of kilobytes:

rustint kb = 35;

Convert this value to bytes.

Задание 9

Given an integer containing a day number from 1 to 31:

rustlet num: u16 = 1;

Determine which decade of the month this day falls in.