Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
  5. C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. #include <stdio.h>
  10.  
  11. int main()
  12. {
  13. int leng = 20;
  14.  
  15. int count = 0;
  16. int idx[leng];
  17.  
  18. // say you meet the dna substring 3 times
  19. for(int i=0; i<3; i++){
  20. // you put the index that you found the substring here
  21. idx[count] = i;
  22. count++;
  23. }
  24.  
  25. // printing count
  26. for(int i=0; i<count; i++){
  27. printf("%d ", idx[i]);
  28. }
  29.  
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement