Advertisement
Guest User

rombus

a guest
Oct 18th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 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 string('s', i).Replace("s", "* "));
  18.             }
  19.             for (int i = 1; i <= n - 1; i++)
  20.             {
  21.                 Console.WriteLine("{0}{1}", new string(' ', i), new string('s', n - i).Replace("s", "* "));
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement