Advertisement
Guest User

romb

a guest
Oct 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _00_test_1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.  
  15.             for (int i = 1; i <= n; i++)
  16.             {
  17.                 Console.WriteLine("{0}{1}", new string(' ', n - i), new StringBuilder().Insert(0, "* ", i));              
  18.             }
  19.             for (int i = 1; i <= n - 1; i++)
  20.             {
  21.                 Console.WriteLine("{0}{1}", new string(' ', i), new StringBuilder().Insert(0, "* ", n - i));
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement