Beispiel #1
0
bool IsPrime(uint64_t num) {
    for (uint64_t i = 2L; i < num; i++) {
        if (IsFactor(i, num))
            return false;
    }
    return true;
}
Beispiel #2
0
main(){
   int x, solution = 0;
   for(x=998000;!solution;x--) {
      if(IsPalendrome(x))
         solution = IsFactor(x);
   }
}
Beispiel #3
0
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;
}