Rust Taskbook Level 1.5
Tell me how many and what range of values the type i16
can take.
Print to the console all numbers that are multiples of 7
in the range from -100
to 100
.
Two integers are given:
let num1: u16 = 12;
let num2: u16 = 13;
Check that the first digits of these numbers match.
Two integers are given:
let num1: u16 = 36;
let num2: u16 = 12;
Check that the first number is divisible by the second without remainder.
Given a string:
let txt: &str = "123456789";
Loop through and output to the console one by one all characters from the end of the line.
Three integers are given:
let num1: u16 = 36;
let num2: u16 = 24;
let num2: u16 = 12;
Print the larger of these numbers to the console.
Three symbols are given:
let chr1: char = 'a';
let chr2: char = 'b';
let chr3: char = 'c';
Merge these characters into a string:
std::string "abc"
Given an integer containing the number of kilobytes:
int kb = 35;
Convert this value to bytes.
Given an integer containing a day number from 1
to 31
:
let num: u16 = 1;
Determine which decade of the month this day falls in.