7 of 100 menu

Rust Taskbook Level 1.7

Tell me how many and what range of values ​​the type u16 can take.

Find the sum of the squares of all odd integers in the range from 1 to 100.

Write code that will print the first N powers of two.

Three lines are given:

let txt1: &str = "123"; let txt2: &str = "456"; let txt3: &str = "789";

Add the values ​​of these rows as integers.

Given a string:

let txt: &str = "123456789";

Find the sum of the digits in this line.

Given a fractional number containing the number of gigabytes:

let gb: f32 = 35.24;

Convert this value to megabytes, kilobytes, and bytes.

enru