Advertisement
Guest User

Trapezoid

a guest
Mar 11th, 2014
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement