Palindrome pyramid pattern printing using numbers | faceprep

Palindrome pyramid pattern printing using numbers | faceprep

The program to print palindrome pyramid patterns using numbers is discussed here. Given a number n, the task is to print a palindrome pyramid containing n number of rows.


Palindrome pyramid pattern printing using numbers

Palindrome half pyramid pattern using numbers

Input:

5 (number of rows)

Output:

1

1  2  1

1  2  3  2  1

1  2  3  4  3  2  1

1  2  3  4  5  4  3  2  1


Program to print palindrome pyramid pattern using numbers

@@coding::1@@


Palindrome pyramid pattern printing using numbers

Palindrome half pyramid pattern using alphabets


Input:

5 (number of rows)


Output:

A

A  B  A

A  B  C  B  A

A  B  C  D  C  B  A

A  B  C  D  E  D  C  B  A


Program to print palindrome pyramid pattern using alphabets

@@coding::2@@


Palindrome pyramid pattern printing using numbers

Palindrome pyramid pattern using numbers


Input:

5(number of rows)


Output:


          1

      1  2  1

    1  2  3  2  1

  1  2  3  4  3  2  1

1  2  3  4  5  4  3  2  1

Program to print palindrome pyramid pattern using numbers


@@coding::3@@


Palindrome pyramid pattern using numbers and stars


Input:

7


Output:

*******1********

*******2*2*******

******3*3*3******

*****4*4*4*4*****

****5*5*5*5*5****

***6*6*6*6*6*6***


Program to print palindrome pyramid pattern using numbers & stars


@@coding::4@@



Palindrome pyramid pattern printing using numbers

Recommended Programs








Palindrome pyramid pattern printing using numbers

c