psotirov

Trapezoid

Dec 10th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using System;
  2.  
  3. class Trapezoid
  4. {
  5.     static void Main()
  6.     {
  7.         int N = int.Parse(Console.ReadLine());
  8.  
  9.         Console.WriteLine(new string('.',N) + new string('*',N));
  10.         for (int i = 1; i < N; i++)
  11.         {
  12.             Console.WriteLine(new string('.', N-i) + "*" + new string('.', N-2+i)+"*");            
  13.         }
  14.         Console.WriteLine(new string('*',2 * N));
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment