silvi81

dna

Nov 22nd, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1. using System;
  2.  
  3. class ProgrammerDNA
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         char letter = (char)Console.Read();
  9.         int lineCount = 0;
  10.  
  11.         while (true)
  12.         {
  13.             for (int i = 0; i < 7; i++)
  14.             {
  15.                 int dotCount = Math.Abs(3 - i);
  16.                 int charCount = 7 - 2 * dotCount;
  17.                 Console.Write(new string('.', dotCount));
  18.  
  19.                 for (int j = 0; j < charCount; j++)
  20.                 {
  21.  
  22.                     Console.Write(letter);
  23.                     if (letter == 'G')
  24.                     {
  25.                         letter = 'A';
  26.                     }
  27.                     else
  28.                     {
  29.                         letter++;
  30.                     }
  31.                 }
  32.  
  33.                 Console.Write(new string('.', dotCount));
  34.                 Console.WriteLine();
  35.                 lineCount++;
  36.  
  37.                 if (lineCount == n)
  38.                 {
  39.                     return;
  40.                 }
  41.             }
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment