Project euler problems resolved using C++ and C