55. Star Staircase

Acceptance — 0 accepted 0 submissions

Easy
Nested LoopsPatterns
No companies listed
Patterns are the gym for your loop muscles. Let's build a staircase of stars.

Given N, print N rows: row 1 has 1 star, row 2 has 2 stars, and so on up to row N with N stars.

Input Format
A single integer N.

Output Format
Print N lines. Line i has exactly i '*' characters with no spaces.

Constraints
• 1 ≤ N ≤ 50

Example 1

Input
3
Output
*
**
***

Explanation Row 1: one star. Row 2: two stars. Row 3: three stars.

Example 2

Input
1
Output
*

Explanation Just one star.

Example 3

Input
5
Output
*
**
***
****
*****

Explanation Five rows, growing by one star each.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
* ** ***
No results yet
Run your code to test it against the sample cases.
Problem List