Rust Taskbook Level 5.9
Задание 1
Display the following pyramid on the screen:
xx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
Задание 2
Make an array of size 10 by 10. Fill it with numbers in order:
rust[
[ 1, 2, 3, 4, 5],
[ 6, 7, 8, 9, 10],
[11, 12, 13, 14, 15],
[16, 17, 18, 19, 20],
[21, 22, 23, 24, 25],
}
Задание 3
Given a number:
rustlet num: u16 = 12345;
Double the digits in this number:
rust1122334455
Задание 4
Given an array:
rust[
"123",
"213",
"321",
}
Replace the characters "1" with "0" in each line:
rust[
"023",
"203",
"320",
}