Livello 5.9 del libro di problemi Java
Visualizza la seguente piramide:
xx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
Dato un array:
{
"123",
"213",
"321",
}
Sostituisci in ogni stringa i caratteri
"1" con "0":
{
"023",
"203",
"320",
}
Dato un numero:
int num = 12345;
Raddoppia le cifre in questo numero:
1122334455
Dato un array:
{
"text1",
"text2",
"text3",
"text4",
"text5"
}
Crea una stringa da questo array in modo che ogni elemento dell'array si trovi su una nuova riga:
"""
text1
text2
text3
text4
text5
"""