Guest User

Untitled

a guest
Jun 14th, 2016
628
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.  
  9.         string s = new string('s', n).Replace("s","* ");
  10.  
  11.         for (int i = 0; i < n; i++)
  12.             Console.WriteLine($"{new string(' ', n-i-1)}{s.Substring(0, 2 * i + 1)}");
  13.  
  14.         for (int i = n-2; i>=0; i--)
  15.             Console.WriteLine($"{new string(' ', n - i - 1)}{s.Substring(0, 2 * i + 1)}");
  16.     }
  17. }
RAW Paste Data