add exercise 3.21, 3.22, 3.23, program 3.9.

Signed-off-by: maxpcn <maxp@netease.com>