minor cosmetic changes to C version of first problem