+ 1

How do you print this pattern using For Loop?

EDCBA DCBA CBA BA A

9th Feb 2017, 4:00 PM
Badrish
Badrish - avatar
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. ;)
9th Feb 2017, 4:21 PM
Gami
Gami - avatar
9th Feb 2017, 5:26 PM
Tashi N
Tashi N - avatar