Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- int polyt(string dna, int N)
- {
- int totalpoly = 0;
- int tcounter = 0;
- for(int i=0;dna[i]!='\0';i++)
- {
- if (dna[i] != 't')
- {
- tcounter = 0;
- }
- if(dna[i] == 't')
- {
- tcounter++;
- }
- if ((tcounter>=N) && (dna[i+1] != 't'))
- {
- totalpoly++;;
- }
- }
- return totalpoly;
- }
Add Comment
Please, Sign In to add comment