update : use lambda + do while instead.
	modified:   ex2_4_1a.cpp