You have to loop twice, one loop for lines and one loop for columns (stars).
Try this:
int i = 1;
while (i<=6)
{
int j = ++i; // must be one more star than lineno
while (j--)
putchar('*'); // is faster than: printf("*");
putchar('\n');
}
Note: Your output is only possible with stop condition i<6 not i<=6.
There are more nifty solutions, but that is on your own.
HTH
Lingo