Advertisement
Guest User

Untitled

a guest
May 28th, 2017
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         for (int a = 0; a < n / 2; a++)
  8.         {
  9.             Console.Write(new string(' ', a) + 'x');
  10.             Console.WriteLine(new string(' ', n - 2 - a * 2) + 'x');
  11.         }
  12.         Console.WriteLine(new string(' ', n / 2) + 'x');
  13.         for (int a = n / 2 - 1; a >= 0; a--)
  14.         {
  15.             Console.Write(new string(' ', a) + 'x');
  16.             Console.WriteLine(new string(' ', n - 2 - a * 2) + 'x');
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement