bool IsPrime(uint64_t num) { for (uint64_t i = 2L; i < num; i++) { if (IsFactor(i, num)) return false; } return true; }
main(){ int x, solution = 0; for(x=998000;!solution;x--) { if(IsPalendrome(x)) solution = IsFactor(x); } }
const char* RegExp::ParseTerm(StrPP& term) { StrPP factor; term = ""; if(reExpression == BOL) { term += reExpression[0]; reExpression++; } do { if(ParseFactor(factor) == "") return(NULL); term += factor; } while(IsFactor()); // parse all factors of this term return term; }