0
How to print inverted number pattern in java?
4444 333 22 1
2 Respostas
+ 1
Please show us your attempt first. I'll give you a clue, one way to do this is to create 2 loops. One loop for printing the values and another one to check how many times are needed to print the values.
0
for (int i = 4; i >= 1; i--) {
for (int j = 1; j <= i; j++){
System.out.print(i);
}
System.out.println();
}