solved 1-23.c