problem 15 in C