D. Triangle

Problem Setup

  • login to CS50 IDE
  • write cd in the terminal to go to the home directory
  • write mkdir triangle to create a folder called triangle
  • write cd triangle to go to the triangle folder
  • write code triangle.cpp to create a file called triangle.cpp and open it in the editor

Problem

You are given an integer \(n\). Make a triangle of size \(n\).

Input

The first line contains an integer \(n\) where \(1 \leq n \leq 100\).

Output

Print a triangle of size \(n\).

Examples

Example 1:

Input:

3

Output:

*
**
***

Example 2:

Input:

5

Output:

*
**
***
****
*****

Test Your Code

Make sure you are in the triangle directory, then run the following command:

check50 iti-technical-team/problemset/2026/2/triangle

Submit Your Code

Make sure you are in the triangle directory, then run the following command:

submit50 iti-technical-team/problemset/2026/2/triangle