Add the solution of the problem ATM in C