jeudi 14 avril 2022

how to print this alphabetic diamond pattern java

i want to print the following pattern in java. can someone help me?

      A
     ABA
    ABCBA
   ABCDCBA
  ABCDEDCBA
 ABCDEFEDCBA
ABCDEFGFEDCBA
 ABCDEFEDCBA
  ABCDEDCBA
   ABCDCBA
    ABCBA
     ABA
      A

Aucun commentaire:

Enregistrer un commentaire