Rust Taskbook Level 1.1
Given a number:
let num: i32 = 123;
Check if it is negative or not. Output this information to the console.
Given a line:
let txt: &str = "abcde";
Print the length of this string to the console.
Given a line:
let txt: &str = "abcde";
Print the last character of the line to the console.
Two words are given.
let word1: &str = "abc";
let word2: &str = "ade";
Check that the first letters of these words match.
The word is given:
let word: &str = "day";
Get its last letter. If the word ends with a soft sign, then get the penultimate letter.
Given a number:
let num: u16 = 123;
Convert this number to a string:
"123"
Given a number:
let num: i16 = 5;
Check that this number is between 1
and 10
.