SHARE
TWEET

Trapezoid

a guest Mar 11th, 2014 243 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Task03Trapezoid
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int width = int.Parse(Console.ReadLine());
  10.             Console.WriteLine("{0}{1}", new string('.', width), new string('*', width));
  11.             for (int i = 0; i < width - 1; i++)
  12.             {
  13.                 Console.WriteLine("{0}*{1}*", new string('.', (width - 1) - i), new string('.', (width - 1) + i));
  14.             }
  15.  
  16.             Console.WriteLine(new string('*', width * 2));
  17.         }
  18.     }
  19. }
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