64,648
社区成员
发帖
与我相关
我的任务
分享
int main(void)
{
string a="ACCGTAGCTACGANT";
if(a.find_first_of("N")!=string::npos)
{
cout<<"find N"<<endl;
}
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a("ACCGTAGCTACGAT);
for (string::size_type ix = 0; ix != a.size(); ++ix) {
if (a[ix] == 'N')
cout << "N at:" << ix << endl;
else
cout << "N not exists!" << endl;
}
return 0;
}