Question: Write a program to enter a text. Then enter a pattern and count the number of times the pattern is repeated in the text. Your
Write a program to enter a text. Then enter a pattern and count the number of times the pattern is
repeated in the text. Your program will read in a string not a character at a time.
Sample test Run red user input Provide your data for test run and
Enter string : She sells sea shells on the sea shore
Enter the pattern : sea
Pattern found times
Print Pattern not found if pattern is not found.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
