0
How to print the below pattern in java
7 76 765 7654 76543 765432 7654321 can anyone give me code
2 ответов
+ 6
Or, you can do it with one loop if you're Chad. ;>
for (String i = "7"; i.length() <= 7; i += Integer.toString((i.charAt(i.length()-1))-49)) {
System.out.println(i);
}
+ 1
You can do it with two nested for loops. You can see my example solution here
https://code.sololearn.com/cuBtngCbEd20/?ref=app. Hope it helps you.