Advertisement
JuliaPetkova

Untitled

May 27th, 2017
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _2_7_06.DNA
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int sum = int.Parse(Console.ReadLine());
  14. int count = 0;
  15.  
  16. for (int firstDig = 1; firstDig <= 4; firstDig++)
  17. {
  18. for (int secondDig = 1; secondDig <= 4; secondDig++)
  19. {
  20. for (int thirdDig = 1; thirdDig <= 4; thirdDig++)
  21. {
  22. count++;
  23.  
  24. if ((firstDig + secondDig + thirdDig) >= sum)
  25. {
  26. Console.Write("O" + ("" + firstDig + secondDig + thirdDig)
  27. .Replace('1', 'A').Replace('2', 'C').Replace('3', 'G').Replace('4', 'T') + "O ");
  28.  
  29. }
  30. else
  31. {
  32. Console.Write("X" + ("" + firstDig + secondDig + thirdDig)
  33. .Replace('1', 'A').Replace('2', 'C').Replace('3', 'G').Replace('4', 'T') + "X ");
  34. }
  35.  
  36. if (count % 4 == 0)
  37. {
  38. Console.WriteLine();
  39. }
  40. }
  41. }
  42.  
  43. }
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement