Skip to content

Files

Latest commit

7102b2e · Jan 17, 2023

History

History

Pattern 5 - GFG

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 17, 2023
Jan 17, 2023

Pattern 5

Easy

Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.

Help Geek build a star pattern.

 

Example 1:

Input: 5

Output:
* * * * *
* * * * 
* * * 
* *  

 

Your Task:

You don't need to input anything. Complete the function printTriangle() which takes  an integer n  as the input parameter and print the pattern.

Constraints:

  • 1<= N <= 20