+ 1
How do you print this pattern using For Loop?
EDCBA DCBA CBA BA A
2 Respuestas
+ 15
I am not really good in Java. But you can use for loops like for (i = 0, i < length of word, i++) and then you can say to outputs something like (I am trying to explain using python) : print(i to length of word).
So basically on the first iteration it will output the whole word because i will be 0, the first letter. The next iteration i will be 1, and it will output the second letter to the last letter. Hopr you understand my explanation, because I explained it using another language. ;)
+ 3
Look at this code:
https://code.sololearn.com/cLF2Bh9RbNnl/?ref=app