Guest User

Untitled

a guest
Dec 9th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. }
  2.  
  3. int polyt(string dna, int N)
  4. {
  5.  
  6. int totalpoly = 0;
  7. int tcounter = 0;
  8.  
  9. for(int i=0;dna[i]!='\0';i++)
  10. {
  11. if (dna[i] != 't')
  12. {
  13. tcounter = 0;
  14. }
  15. if(dna[i] == 't')
  16. {
  17. tcounter++;
  18. }
  19. if ((tcounter>=N) && (dna[i+1] != 't'))
  20. {
  21. totalpoly++;;
  22. }
  23.  
  24.  
  25. }
  26. return totalpoly;
  27.  
  28. }
Add Comment
Please, Sign In to add comment