Advertisement
Guest User

Untitled

a guest
Apr 27th, 2016
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.74 KB | None | 0 0
  1. using System;
  2.  
  3. class MalkoKote
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         char kitty = char.Parse(Console.ReadLine());
  9.  
  10.        
  11.  
  12.  
  13.         Console.WriteLine(" " + kitty + new string(' ', (n / 2 + 1) / 2 - 2) + kitty);
  14.         for(int row = 0; row < n/4 - 1; row ++ )
  15.         {
  16.             Console.Write(' ');
  17.             Console.Write(new string(kitty, (n / 2 + 1) / 2));
  18.             Console.WriteLine();
  19.         }
  20.  
  21.         for (int row = 0; row < n / 4 - 1; row++)
  22.         {
  23.             Console.Write("  ");
  24.             Console.Write(new string(kitty, ((n / 2 + 1) / 2) - 2));
  25.             Console.WriteLine();
  26.         }
  27.  
  28.         for (int row = 0; row < n / 4 - 1; row++)
  29.         {
  30.             Console.Write(' ');
  31.             Console.Write(new string(kitty, (n / 2 + 1) / 2));
  32.             Console.WriteLine();
  33.         }
  34.  
  35.         Console.Write(' ');
  36.         Console.Write(new string(kitty, (n / 2 + 1) / 2));
  37.         Console.Write("   ");
  38.         Console.Write(new string(kitty, ((n / 2 + 1) / 2) - 1));
  39.         Console.WriteLine();
  40.  
  41.         int rows = (n / 2 + 1) / 2;
  42.         for (int row = 0; row < rows; row++)
  43.         {
  44.             Console.Write(new string(kitty, rows + 2));
  45.             Console.Write(new string(' ', 2));
  46.             Console.Write(kitty);
  47.             Console.WriteLine();
  48.         }
  49.  
  50.         Console.Write(new string(kitty, rows + 2));
  51.         Console.Write(' ');
  52.         Console.Write(new string(kitty, 2));
  53.  
  54.         Console.WriteLine();
  55.  
  56.         int width = rows + 2 + rows;
  57.         int tail = ((n / 2 + 1) / 2) - 1;
  58.         Console.Write(' ');
  59.         Console.Write(new string(kitty, width - tail));
  60.         Console.WriteLine();
  61.  
  62.  
  63.  
  64.      
  65.  
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement