I have already done this with a nested for loop but, I also want to know how to do this with a while loop. I already have this
int j = 10;
int k = 0;
while (j > 0)
{
if (k <= j)
{
Console.Write("* ");
Console.WriteLine();
}
j--;
} Console.WriteLine();
and it prints out a line of stars(*). I know the inner loop has to refer to the outer loop but I'm not sure how to do this in a while statement.