lengthening prog4B.cpp