Why do you use 3 loops?
for (int j = 0; j <= i; j++)
{
for (int k = 1; k <= (i - j); k++)
Console.Write(" ");
for (int l = 1; l <= j; l++)
You need to use only 2 loops! Imagine, you need to fill array...
In pseudo-code:
string stars = string.Empty;
for (int i = 1; i<=NumberEnteredByUser; i++)
{
for (j = 1; j<=i; j++)
{
stars = string.Concat(stars, "*");
}
Console.WriteLine(stars);
stars = string.Empty;
}
Got it?
Note that string is immutable. What it means? Read here:
Why strings are immutable and what are the implications of it?[
^]