Star Pattern

Easy
0/40
27 upvotes
Asked in companies
IBMAmazonRaja Software Labs (RSL)

Problem statement

Pattern for N = 4


Hint
As taught in the video, you just have to modify the code so that instead of printing numbers, it should output stars ('*').

The dots represent spaces.



Detailed explanation ( Input/output format, Notes, Images )
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 :
    *
   *** 
  *****
 *******
Approaches (1)
Time Complexity
Space Complexity
Code Solution
(100% EXP penalty)
Star Pattern
Full screen
Console