Add #28 solutions in C and Ruby