Computer Science, asked by arorasugandhi36, 6 months ago

Write a program to display
A B C D E

B C D E

C D E

D E

E​

Answers

Answered by thanvi13
0

Answer:

public class KboatStringPattern

{

public static void main(String args[]) {

String word = "ABCDE";

int len = word.length();

for (int i = 0; i < len; i++) {

for (int j = i; j < len; j++) {

char ch = word.charAt(j);

System.out.print(ch);

}

System.out.println();

}

}

Similar questions