Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Espinola_JohnCarl_03LabExc1
- {
- class Program
- {
- static void Main(string[] args)
- {
- DrawPyramid(20);
- }
- static void DrawPyramid(int n)
- {
- for (int i = 1; i <= n; i++)
- {
- for (int j = i; j <= n; j++)
- {
- Console.Write(" ");
- }
- for (int k = 1; k <= 2 * i - 1; k++)
- {
- Console.Write("*" + " ");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement