Generation

generate functionThu, 17 Nov 2022

Draw a triangle

public static void DrawTriangle(int N) { for (int row = 1; row <= N; row++) { for (int col = 1; col <= row; col++) { Console.Write("*"); } Console.WriteLine(); } }

Want to kickstart your project?Use the new AI Studio to create your code