Advertisement
k0mZ

Untitled

May 30th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1.  
  2. #include "string.h"
  3. #include "stdio.h"
  4. void main() {
  5. int count = 0;
  6. char R[51],rc[21];
  7. const char *tmp = R;
  8. gets(R);printf("\n");gets(rc);
  9. while(tmp = strstr(tmp, rc))
  10. {
  11. count++;
  12. tmp++;
  13. }
  14. printf("%d",count);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement