Problem 117 in C