C Programming Math Problems