define algorithms

Project description
generate pseudo-code for an algorithm + post programming code with discussion

1 Numbers. Your algorithm should:
Search a string of at least five numbers (for example, 37540)
Identify all of the substrings that form numbers that are divisible by 3.
For example, applying the algorithm on the string 37540 should produce the following substrings (not necessarily in this order): 0; 3; 75; 54; 375; 540.

Word Search.
Make a list of five words, 3-6 letters in length.
Create a string of approximately 30 letters containing some of the five words.
Your algorithm should identify all of the substrings of the longer string that match any of the five words you generated, and the number of times each one appears
For example: If you chose the words structure, such, system, blue, red, and your algorithm operates on the string jkdistructuredstrusyssystemoon, your algorithm should report that the string contains the words structure, red and system each one time, and the words such and blue zero times.