Rust Taskbook Level 1.3
Tell me how many bytes the i8
type takes.
Print to the console all integers from 1
to 10
.
Given a string, if there is more than one character in the string, print the second to last character of the string to the console.
Given an integer, check that the first and last digits of this number match.
Two integers are given:
let num1: u16 = 36;
let num2: u16 = 12;
Print the larger of these numbers to the console.
Given a string containing an integer:
let txt: &str = "123";
Convert this string to a number:
123
Given an integer containing a month number from 1
to 12
:
let num: u8 = 1;
Determine what season this month falls in.