Arxero

Untitled

Sep 28th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace DNA_Sequences
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int input1 = int.Parse(Console.ReadLine());
  14.             for (int a1 = 1; a1 <= 4; a1++)
  15.             {
  16.                 for (int a2 = 1; a2 <= 4; a2++)
  17.                 {
  18.                     for (int a3 = 1; a3 <= 4; a3++)
  19.                     {
  20.                         if (a1 + a2 + a3 < input1) { Console.Write("X"); }
  21.                         if (a1 + a2 + a3 >= input1) { Console.Write("O"); }
  22.                         switch (a1)
  23.                         {
  24.                             case 1: Console.Write('A'); break;
  25.                             case 2: Console.Write('C'); break;
  26.                             case 3: Console.Write('G'); break;
  27.                             case 4: Console.Write('T'); break;
  28.                         }
  29.                         switch (a2)
  30.                         {
  31.                             case 1: Console.Write('A'); break;
  32.                             case 2: Console.Write('C'); break;
  33.                             case 3: Console.Write('G'); break;
  34.                             case 4: Console.Write('T'); break;
  35.                         }
  36.                         switch (a3)
  37.                         {
  38.                             case 1: Console.Write('A'); break;
  39.                             case 2: Console.Write('C'); break;
  40.                             case 3: Console.Write('G'); break;
  41.                             case 4: Console.Write('T'); break;
  42.                         }
  43.                         if (a1 + a2 + a3 < input1) { Console.Write("X"); }
  44.                         if (a1 + a2 + a3 >= input1) { Console.Write("O"); }
  45.                         Console.Write(" ");
  46.  
  47.                     }
  48.                     Console.WriteLine();
  49.                 }
  50.             }
  51.         }
  52.     }
  53. }
Add Comment
Please, Sign In to add comment