Rozwiązanie:
#include<iostream>
#include<string>
using namespace std;
string ta(string s)
{
for (int i = 0; i < s.length(); i++)
if (s[i] == 'C' || s[i] == 'G' || s[i] == 'T')
s[i] = '*';
}
return s;
int main()
string dna;
cout << "Podaj DNA: "; cin >> dna;
cout << "Wynik: " << ta(dna);
return 0;
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Rozwiązanie:
#include<iostream>
#include<string>
using namespace std;
string ta(string s)
{
for (int i = 0; i < s.length(); i++)
{
if (s[i] == 'C' || s[i] == 'G' || s[i] == 'T')
s[i] = '*';
}
return s;
}
int main()
{
string dna;
cout << "Podaj DNA: "; cin >> dna;
cout << "Wynik: " << ta(dna);
return 0;
}