-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBA_C
40 lines (35 loc) · 975 Bytes
/
BA_C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace z3
{
class Program
{
static string okreni(string text)
{
string novi = "";
for (int i = text.Length-1; i >=0; i--)
{
novi += text[i];
}
return novi;
}
static string kompl(string text)
{
string novi = "";
for(int i=0;i<text.Length;i++)
{
if (text[i] == 'A') novi += 'T';
else if (text[i] == 'T') novi += 'A';
else if (text[i] == 'G') novi += 'C';
else if (text[i] == 'C') novi += 'G';
}
return novi;
}
static void Main(string[] args)
{
string text = "AGTCGCATAGT";
string novi = okreni(text);
string kmpl = kompl(novi);
Console.WriteLine("devetmer : {0} \n međurez : {1} \n kompl : {2}", text, novi, kmpl) ;
}
}
}