I have a string which starts with only 1 character "$". I have created a loop which runs 4 times, and each time, i want my string to append with 1 extra "$". So when the program runs, it should result in this:
$
$$
$$$
$$$$
Here is my attempt so far:
string draw = "";
int counter = 0;
while (counter < size) // size is 4
{
counter++;
draw += "$\n";
}
So at the moment it results in:
$
$
$
$
Once i get this too work i would then also like to decrease by 1 each time after it reached the size. So if the size is 4 it should look like this:
$
$$
$$$
$$$$
$$$
$$
$