Computer Science, asked by ankithazra05, 5 months ago

write down a program in java to print the above pattern ​

Attachments:

Answers

Answered by saidulnayan781
0

Answer:

public class pattern {

   public static void main(String[] args) {

       int n = 5;

       int p = 65;

       

       for(int i=0;i<n;i++)

       {

           for(int j=n-1;j>i;j--)

           {

               System.out.print(" ");

           }

           for(int k=0;k<=i;k++)

           {    

               System.out.print((char)(p-k));

           }

           p++;

           System.out.println();

       }

   }

}

Similar questions