add break
This commit is contained in:
@@ -5,8 +5,29 @@ using namespace std;
|
||||
|
||||
std::string DNAStrand(const std::string& dna){
|
||||
std::vector<std::string> DNA;
|
||||
for (auto d : dna)
|
||||
DNA.push_back(d);
|
||||
|
||||
|
||||
for (int i = 0; i < dna.length(); i++)
|
||||
DNA.push_back(dna);
|
||||
uint_fast32_t i=0;
|
||||
for (auto elements : DNA){
|
||||
if(elements == "A"){
|
||||
DNA.assign( i, "T");
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
else if(elements == "T"){
|
||||
DNA.assign( i, "A");
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
else if(elements == "C"){
|
||||
DNA.assign( i, "G");
|
||||
i++;
|
||||
break;
|
||||
}
|
||||
else if(elements == "G"){
|
||||
DNA.assign( i, "C");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
std::string str(DNA.begin(), DNA.end());
|
||||
}
|
||||
Reference in New Issue
Block a user