Advertisement
F3rnando

Untitled

Jul 28th, 2016
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include<stdio.h>
  2. main(){
  3.  
  4. char dna[3]={'C','A','T'};
  5. char ca[10]={'C','T','A','C','A','A','C','T','G','G'};
  6. char co[10]={'T','T','G','C','A','T','A','G','C','C'};
  7. char ra[10]={'G','G','A','C','A','T','G','C','G','A'};
  8. int mod,mod2,mod3;
  9.  
  10.  
  11. for(mod=0 ;mod<=9; mod++){
  12.  
  13. if (dna[0] == ca[mod] && dna[1] == ca[mod+1] && dna[2] == ca[mod+2])
  14. printf("\n cachorro");
  15. }
  16.  
  17.  
  18. for(mod2=0; mod2<=9; mod2++){
  19.  
  20. if (dna[0] == co[mod2] && dna[1] == co[mod2+1] && dna[2] == co[mod2+2])
  21. printf("\n coelho");
  22. }
  23.  
  24.  
  25. for(mod3=0; mod3<=9; mod3++){
  26.  
  27. if (dna[0] == ra[mod3] && dna[1] == ra[mod3+1] && dna[2] == ra[mod3+2])
  28. printf("\n rato");
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement