Java Taskbook Level 5.10
Задание 1
Display the following pyramid on the screen:
1
333
55555
7777777
999999999
333
55555
7777777
999999999
Задание 2
Given an array with some integers, for example, like this:
javaint[] arr = {123, 456, 789};
Write code that will reverse the numbers in this array as follows:
java{321, 654, 987}
Задание 3
Given an array with some integers, for example, like this:
javaint[] arr = {123, 333, 133};
Replace all threes in each number with zeros, except for the threes at the beginning of the number:
java{120, 300, 100}
Задание 4
Ask the user for a number. Print the multiplication table for that number to the console. Below is an example for two:
terminal1 * 2 = 2
2 * 2 = 3
3 * 2 = 6
4 * 2 = 8
5 * 2 = 10
6 * 2 = 12
7 * 2 = 14
8 * 2 = 16
9 * 2 = 18
Задание 5
Given a line:
java"""
text1
text2
text3
text4
text5
"""
Split this string into an array so that each non-empty line of text becomes a separate array element:
java[
"text1",
"text2",
"text3",
"text4",
"text5",
]