Java Taskbook Level 5.9
Задание 1
Display the following pyramid on the screen:
xx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
Задание 2
Given an array:
java{
"123",
"213",
"321",
}
Replace the characters "1" with "0" in each line:
java{
"023",
"203",
"320",
}
Задание 3
Given a number:
javaint num = 12345;
Double the digits in this number:
java1122334455
Задание 4
Given an array:
java{
"text1",
"text2",
"text3",
"text4",
"text5"
}
Make a line out of this array so that each element of the array is on a new line:
java"""
text1
text2
text3
text4
text5
"""