43. Right-Angled Triangle Pattern
Foundation1000 ms256 MBSolved by 0%
Read an integer n and print a right-angled triangle of stars with
n rows. Row 1 has one star, row 2 has two, and so on.
*
**
***
****
No trailing spaces, and no blank line after the last row.
Constraints - `1 ≤ n ≤ 100`
Input
A single line containing one integer n.
Output
Print n lines: line i holds i asterisks. No trailing spaces, and no blank line after the last row.
Input4
Output*
**
***
****
Noteis the worked example from the statement
Input1
Output*
Noteis a single row with a single star and no newline after it
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution