Computer Science, asked by darshanabalamurali6, 9 months ago

5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
write a java program to display this pattern​

Answers

Answered by Hamdanbro
1

Answer:Source Code

public class Pattern {

   public static void main(String[] args) {

       char last = 'E', alphabet = 'A';

       for(int i = 1; i <= (last-'A'+1); ++i) {

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

               System.out.print(alphabet + " ");

           }

           ++alphabet;

           System.out.println();

       }

   }

}

Explanation:

Similar questions