31 of 100 menu

Rust Taskbook Level 4.1

Given a string of letters and numbers, get the position of the first digit in that string.

Given a vector:

let vct = vec![1, 2, 3, 4, 5];

Find the sum of the first and last elements of the vector.

Write a program that will generate the following string:

"xxxxx"

Given a fractional number:

let num: f32 = 12.34;

Write the integer part of the number in one variable and the fractional part in another:

let num1: u16 = 12; let num2: u16 = 34;
bydeenesfrptru