Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.7 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.7 KB

Easy

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

Help Ram build a 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