Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main()
- {
- char cuv[50],prop[10240];
- int cont=0;
- scanf("%s",cuv);
- scanf(" %[^\n]",prop);
- char *p;
- p=prop;
- p=strstr(p,cuv);
- cont++;
- if(p==NULL){printf("0"); return 0;}
- while(p!=NULL)
- {p=strstr(p+1,cuv);
- cont++;}
- cont--;
- printf("%d",cont);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement