59 of 100 menu

Rust Taskbook Level 6.9

Determine how many days are left until the next Sunday. Output the result to the console.

Output to the console the name of the day of the week of the last day of the current month.

Given a string with a number:

"1234567"

Separate the triplets of numbers with spaces, starting from the end of the number. In our case, we should get the following:

"1 234 567"

Given an array of numbers:

[1, 2, 3, 3, 4, 5}

Check that this array contains two identical elements in a row.

Seconds are given:

let sec: i16 = 1323435;

Find the number of days, hours, minutes and seconds corresponding to this date:

struct Time { days: u16, hours: u8, minutes: u8, seconds: u8, }

This means first getting the whole number of days, then extracting the whole number of hours from the remainder, then extracting the whole number of minutes from the remainder, and what remains will be seconds.

enru