Advertisement
Guest User

DNA

a guest
May 28th, 2017
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace DNASequence
  4. {
  5.     public class Sequence
  6.     {
  7.         public static void Main()
  8.         {
  9.             int matchSum = int.Parse(Console.ReadLine());
  10.  
  11.             for(int i =1; i<=4; i++)
  12.             {
  13.                 for (int j=1; j<=4; j++)
  14.                 {
  15.                     for (int k=1; k<=4; k++)
  16.                     {
  17.                         string wrap = i + j + k >= matchSum ? "O" : "X";
  18.                         Console.Write($"{wrap}{i}{j}{k}{wrap} "
  19.                             .Replace("1","A")
  20.                             .Replace("2","C")
  21.                             .Replace("3","G")
  22.                             .Replace("4","T"));
  23.                     }
  24.                     Console.WriteLine();
  25.                 }
  26.                
  27.             }
  28.  
  29.  
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement