SHARE
TWEET

xxxxx

a guest May 29th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. public class X
  4. {
  5.     public static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         int outterSpaces = 0;
  9.         int innerSpaces = n - 2;
  10.         for (int i = 0; i < n / 2; i++)
  11.         {
  12.             Console.WriteLine("{0}{1}{2}{1}",
  13.                 new string(' ', outterSpaces),
  14.                 "x",
  15.                 new string(' ', innerSpaces)
  16.                 );
  17.             innerSpaces -= 2;
  18.             outterSpaces++;
  19.         }
  20.         Console.WriteLine("{0}{1}", new string(' ', n/2), "x");
  21.  
  22.         for (int i = 0; i < n / 2; i++)
  23.         {
  24.             innerSpaces += 2;
  25.             outterSpaces--;
  26.             Console.WriteLine("{0}{1}{2}{1}",
  27.                 new string(' ', outterSpaces),
  28.                 "x",
  29.                 new string(' ', innerSpaces)
  30.                 );
  31.         }
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top