Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Webinars
About Us

Edit
Reply




Edit

Pyramid pattern using stars or Pyramid star patterns | FACE Prep

Published on 10 Mar 2020

Program to print pyramid pattern using stars or Pyramid star patterns are discussed here. For any given number n, print various pyramid star patterns.


Half Pyramid Star Pattern


*
* *
* * *
* * * *
* * * * *
* * * * * *

Program to print half pyramid pattern using stars


C
C++
Java
Python 3

Output
5
*
* *
* * *
* * * *
* * * * *


Inverted Half pyramid


* * * * * *
* * * * *
* * * *
* * *
* *
*


Program to print inverted half pyramid pattern using stars


C
C++
Java
Python 3

Output
5
* * * * *
* * * *
* * *
* *
*


Full Pyramid Star Pattern


      *
     * *
    * * *
   * * * *
  * * * * *
 * * * * * *


Program to print full pyramid pattern using stars


C
C++
Java
Python 3

Output
4
   *
  * * *
 * * * * *
* * * * * * *


Inverted Full pyramid


 * * * * * *
  * * * * *
   * * * *
    * * *
     * *
      *


Program to print inverted full pyramid pattern using stars


C
C++
Java
Python 3

Output
4
* * * * * * *
 * * * * *
  * * *
   *


Hollow Full Pyramid Star Pattern


          
           *   
         *  *
       *      *
     *          *
   * * * * * * * *


Program to print hollow full pyramid pattern using stars


C
C++
Java

Output
4
   *
  * *
 *   *
*     *
*******


Inverted Half pyramid


* * * * * *
*        *
*     *
*  *
*


Program to print inverted half pyramid pattern


C
C++
Java

Output
5
* * * * *
*      *
*    *
*  *
*


Inverted Hollow Full Pyramid


* * * * * *
 *       *
  *    *
    *


Program to print inverted hollow full pyramid


C
C++
Java

Output
4
*******
*     *
 *   *
  * *
   *

Recommended Programs






If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in