Chinese Remainder Theorem C Code