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