Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DNA_Sequences
- {
- class Program
- {
- static void Main(string[] args)
- {
- int input1 = int.Parse(Console.ReadLine());
- for (int a1 = 1; a1 <= 4; a1++)
- {
- for (int a2 = 1; a2 <= 4; a2++)
- {
- for (int a3 = 1; a3 <= 4; a3++)
- {
- if (a1 + a2 + a3 < input1) { Console.Write("X"); }
- if (a1 + a2 + a3 >= input1) { Console.Write("O"); }
- switch (a1)
- {
- case 1: Console.Write('A'); break;
- case 2: Console.Write('C'); break;
- case 3: Console.Write('G'); break;
- case 4: Console.Write('T'); break;
- }
- switch (a2)
- {
- case 1: Console.Write('A'); break;
- case 2: Console.Write('C'); break;
- case 3: Console.Write('G'); break;
- case 4: Console.Write('T'); break;
- }
- switch (a3)
- {
- case 1: Console.Write('A'); break;
- case 2: Console.Write('C'); break;
- case 3: Console.Write('G'); break;
- case 4: Console.Write('T'); break;
- }
- if (a1 + a2 + a3 < input1) { Console.Write("X"); }
- if (a1 + a2 + a3 >= input1) { Console.Write("O"); }
- Console.Write(" ");
- }
- Console.WriteLine();
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment