Explore

Edit

Edit

# Palindrome pyramid pattern printing using numbers | FACE Prep

Published on 11 Mar 2020

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

## 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

C
C++
Java
Python 3

Output
Enter the number of rows : 5
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

## 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

C
C++
Java
Python 3

Output
Enter the number of rows : 5
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

## 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

C
C++
Java

Output
6

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

## 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

C
C++
Java

Output
7
*******1********
*******2*2*******
******3*3*3******
*****4*4*4*4*****
****5*5*5*5*5****
***6*6*6*6*6*6***

Recommended Programs