custom checking C/C++ program student answer