I am required to use nested for loops and print(\'*\', end=\' \') to create the pattern shown here:
print(\'*\', end=\' \')
And here is my code. I have figured out the first t
var n = 5; for(int row = 0 ; row < n; row++) { for(int col = 1; col <= n; col++) { if(col < n - row) { Console.Write(" "); } else { Console.Write("*"); } } Console.WriteLine(); }
(D)