Rust Taskbook Level 4.3
Given a string of letters and numbers, get the position of the penultimate digit in this string.
Print to the console all numbers in the range from 10
to 1000
, whose second-to-last digit is even.
Given a vector:
let vct = vec![1, 2, 3, 4, 5];
Print the elements of this vector to the console in reverse order.
Write a program that will generate the following string:
"123456789"
Given a string of integers separated by spaces:
let txt: &str = "123 456 789";
Find the sum of the numbers in this line.
There is a line with the words:
let txt: &str = "word1 word2 word3";
Get the first N
words from this string as a word vector.
Given an integer:
let num: u16 = 12345;
Get an array of the number's characters in reverse:
['5', '4', '3', '2', '1']