Stephen Prata: C++ Primer Plus (6th Edition) . Book exercises. Chapter 18