problem 14 in C