problem 25 in C