Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace DNASequence
- {
- public class Sequence
- {
- public static void Main()
- {
- int matchSum = int.Parse(Console.ReadLine());
- string[] Letters = { "A", "C", "G", "T" };
- for(int i =1; i<=4; i++)
- {
- for (int j=1; j<=4; j++)
- {
- for (int k=1; k<=4; k++)
- {
- string wrap = i + j + k >= matchSum ? "O" : "X";
- Console.Write($"{wrap}{Letters[i-1]}{Letters[j-1]}{Letters[k-1]}{wrap} ");
- }
- Console.WriteLine();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement