How many bobs are there?
1. Katas
Problem:
There is one one whole string in lower case, which consists of letters. And in this line you need to find the number that is repeated "bob".
Note: If there is "...bobobob...", in the string, then it is considered as bob has been occurs 3 times!
Task:
Display: Bob occurs times: n, where n is the number of times that "bob" occurs.
Data to check:
s - string to check
- s = "babbobbobabrbb" -> Bob occurs times: 2
- s = "boobobbobobdasdabbo" -> Bob occurs times: 3
- s = "ogbobbobobozobobojbobobsobob" -> Bob occurs times: 7
Where "->" means after starting the program
What's next ?
The program does not come out or works not exactly,go to the solution folder and look at the explanation for solving the problem, this will help you.
If you have everything turned out, you can go to the solution package and compare your solution with the one that's there.
If your decision does not coincide with my decision, then I'm very happy for you. Please share it with me, I will be very grateful to you and then I will add it to the solution folder. How to add your solution, see here