Advertisement
Guest User

DNA2.0

a guest
May 28th, 2017
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 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.             string[] Letters = { "A", "C", "G", "T" };
  12.  
  13.             for(int i =1; i<=4; i++)
  14.             {
  15.                 for (int j=1; j<=4; j++)
  16.                 {
  17.                     for (int k=1; k<=4; k++)
  18.                     {
  19.                         string wrap = i + j + k >= matchSum ? "O" : "X";
  20.  
  21.                         Console.Write($"{wrap}{Letters[i-1]}{Letters[j-1]}{Letters[k-1]}{wrap} ");
  22.  
  23.                     }
  24.                     Console.WriteLine();
  25.                 }
  26.                
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement