The second chapter c++ program on niton's book.