57 of 100 menu

Rust Taskbook Level 6.7

Ask the user to enter their phone number. Check that the entered data matches the phone number format.

Get the vector of all weekend days of the current year in the format year-month-day.

Write code that will compare the two dates below and print a message telling you which one is greater:

let date1 = "2020-11-30"; let date2 = "2020-12-31";

The date is given in the following structure:

struct Date { year: u16, month: u8, day: u8, }

Get the day of the week corresponding to this date.

Given a number:

123456

Find the sum of the pairs of digits of this number. In our case, we mean the following:

12 + 34 + 56
enru