DSA SheetLesson · no judge

CODE DRILL 1 · RUN ONLY

Write it, run it, read the output

This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.

TASK

Using nested loops, print the n = 4 left-aligned triangle. The output must contain one star on row 1, two on row 2, three on row 3, and four on row 4, with each row on its own line.

C++
Loading editor…

OUTPUT

Sample
*
**
***
****

What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.