First, read through the program (do it together with fellow students) and understand what happens.
Next, use the pattern to write a couple of new stream manipulators. If possible, make some which are more useful than the one I wrote. Maybe manipulators that affect the state of the stream, instead putting characters to the stream.
I recommend that you take a look at page 1087 in The C++ Prog. Lang. (4. edition).
There is no solution to this exercise