added code in C and Go to solve the challenge