Rust Taskbook Level 8.6

Задание 1

Given a text file. Get the percentage of each character. Write the result to a new file.

Задание 2

Given a text file, get the first line from this file.

Задание 3

Given a text file, shuffle the lines in this file in random order.

Задание 4

Get a list of all possible lucky tickets. A ticket is a string of six digits, possibly with leading zeros. A ticket is lucky if the sum of the first three digits equals the sum of the second three digits. Write the resulting list to a file, each ticket on a new line.

Задание 5

Write a program that will generate the following array:

rust[
  "x",
  "xx",
  "xxx",
  "xxxx",
  "xxxxx",
}