Advertisement
Guest User

ForestRoad

a guest
Mar 11th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. class ForestRoad
  5. {
  6.     static void Main()
  7.     {
  8.         int N = int.Parse(Console.ReadLine());
  9.  
  10.         for (int i = 0, j = N-1 ; i < N; i++,j--)
  11.         {
  12.             Console.Write(new string('.',i));
  13.             Console.Write('*');
  14.             Console.Write(new string('.',j));
  15.             Console.WriteLine();
  16.         }
  17.         for (int i = N - 1, j = 0; j < N; i--, j++)
  18.         {
  19.             if (j == 0)
  20.             {
  21.                 continue;
  22.             }
  23.             Console.Write(new string('.', i));
  24.             Console.Write('*');
  25.             Console.Write(new string('.', j));
  26.             Console.WriteLine();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement