Problem 52 in C