Advertisement
Guest User

Forest Road

a guest
Mar 9th, 2014
428
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement