Draw an asterisk triangle Inspired by a task for programming 101 here's a task that hopefully isn't too easy or is a duplicate (kinda hard to search for things like this).

Input:


A positive integer n &gt;= 1.


Output:


n lines of asterisks, where every new line has one asterisk more than the line before, and starting with one asterisk in the first line.


General rules:


This is code-golf, so shortest answer in bytes wins.
Since the course is taught in C++, I'm eager to see solutions in C++.


Test case (n=5):

*
**
***
****
*****
Vim, 8 bytes

o &lt;Esc&gt;&lt;C-V&gt;{r*J


Takes input in the readahead buffer, so if input is 15, you would type that and then the code above. This is a silly rule, but seems to be allowed. If you got input in a register like "a, you'd just stick @a in front (10). If you got it from the start file, you'd prepend D@" instead (11).

Relies on abuse of :set autoindent, which is default in vimgolf.com rules and default in Vim 8 (and everyone uses it anyway).


o &lt;Esc&gt;: With its number argument, if your text starts with whitespace, and you have :set autoindent, Vim glitches out and creates a cascade of indent.
&lt;C-V&gt;{r*: Turn all those spaces into *s. I'm using block visual so that, even if your lousy indent settings silently group your spaces into tabs, you'll still get the right number of *s.
J: Starting with o unfortunately left a blank line at the top. This removes it.