Star Pattern

Pattern for N = 4

Star Pattern

The dots represent spaces.

Input Format :
N (Total no. of rows)
Output Format :
Pattern in N lines
Constraints :
0 <= N <= 50
Sample Input 1 :
3
Sample Output 1 :
   *
  *** 
 *****
Sample Input 2 :
4
Sample Output 2 :
    *
   *** 
  *****
 *******


Comments

Popular posts from this blog

MySQL Multi Source Master Slave Replication using GTID

Setting Up PostgreSQL Logical Replication with Docker Compose

Access and modify all the resources of our Wiki.js using WikiJS API