SHARE
TWEET

Problem13Trapezoid

g-stoyanov Dec 13th, 2012 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class Problem13Trapezoid
  4. {
  5.     static void Main()
  6.     {
  7.         byte n = byte.Parse(Console.ReadLine());
  8.         Console.WriteLine(new string('.', n) + new string('*', n));
  9.         for (int modRight = n - 1, modLeft = n - 1; modLeft > 0; modRight++, modLeft--)
  10.         {
  11.             Console.WriteLine(new string('.', modLeft) + '*' + new string('.', modRight) + '*');
  12.         }
  13.         Console.WriteLine(new string('*', n * 2));
  14.     }
  15. }
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