Write a program in Java to display the following pattern:
AAAAABBBBCCCDDE
14 Likes
public class KboatPattern { public static void main(String args[]) { for (char i = 'A'; i <= 'E'; i++) { for (int j = i; j <= 'E'; j++) { System.out.print(i); } System.out.println(); } } }
Answered By
9 Likes