三紫一红一绿
#include<bits/stdc++.h>
using namespace std;
int main(){
string uns,trs;
getline(cin,uns);
for(int i=0;i<=uns.size();i++)
{
if(uns[i]=='A')
{
trs[i]='T';
}
else if(uns[i]=='T')
{
trs[i]='A';
}
else if(uns[i]=='G')
{
trs[i]='C';
}
else if(uns[i]=='C')
{
trs[i]='G';
}
}
for(int j=0;j<=uns.size();j++)
{
cout<<trs[j];
}
return 0;
}
哪里有问题?