Advertisement
Guest User

Forest Road

a guest
Mar 9th, 2014
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Task03ForestRoad
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string inputWidth = Console.ReadLine();
  10.             int width = int.Parse(inputWidth);
  11.             for (int i = width - 1; i >= -(width - 1); i--)
  12.             {
  13.                 Console.WriteLine("{0}*{1}", new string('.',  (width - 1) - Math.Abs(i)), new string('.',  Math.Abs(i)));
  14.             }
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement