Write an algorithm, using pseudocode, to perform the following task,
* Given a string of numbers, 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
Please be informed that it must be in pseudocode