I assume you are a student. You should attempt problems yourself before asking for help. Rather than asking us to do it for you why not provide us with some example code and ask us what is wrong with it. Trying is better than not trying at all.
Here is the code anyway:
1 2 3 4 5 6 7 8 9 10 11 12 13
int totalOutputs = 6;
for (int b = 1; b <= totalOutputs; b++)
{
for (int i = 1; i <= totalOutputs; i++)
{
if (i > b)
cout << "*";
else
cout << i;
}
cout << endl;
}