Advertisement
EvlogiHr

TelerikLogo

Dec 29th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2.  
  3. class TelerikLogo
  4. {
  5.     static void Main()
  6.     {
  7.         int x = int.Parse(Console.ReadLine());
  8.  
  9.         for (int row = 0; row < 3 * x - 2; row++)
  10.         {
  11.             for (int col = 0; col < 3 * x - 2; col++)
  12.             {
  13.                 if (col == (x + 1) / 2 - row - 1 || col == (x + 1) / 2 + 2 * x - 3 + row)
  14.                 {
  15.                     Console.Write("*");
  16.                 }
  17.                 else if ((col == (x + 1) / 2 + row - 1 || col == (x + 1) / 2 + 2 * x - 3 - row) && row < 2 * x - 1)
  18.                 {
  19.                     Console.Write("*");
  20.                 }
  21.                 else if ((col == (x * 1) / 2 + row - 2 * x + 2 || col == (x + 1) / 2 + 4 * x - 5 - row) && row >= 2 * x - 1)
  22.                 {
  23.                     Console.Write("*");
  24.                 }
  25.                 else
  26.                 {
  27.                     Console.Write(".");
  28.                 }
  29.             }
  30.             Console.WriteLine();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement