add a exercise of The beauty of programming