I need logic for the following program. please help me
Question :
Accept 2 strings and check how many times the second string is in the first string.
Example1:
Enter main string : This is a dog which is angry. This is a dog which eat much.
Enter string to check: This is a dog
output
2 times the 2nd string is present in the main string.