hi everyone, can someone help me explain no what is this code means?
Code:bool FindNumber(int iPos) { int iNumberTwo, iTotal; if(iPos < 1) return false; if (iPos == number) { iTotal = array[iPos-1] + array[0]; if (IsPrime(iTotal)) { for(int j=0; j< number; j++) { printf("%d ", array[j]); } printf("\n"); return true; } else return false; } iNumberTwo = GetNumber(iPos, 0); while(iNumberTwo != 0) { array[iPos] = iNumberTwo; iTotal = array[iPos]+array[iPos-1]; if (IsPrime(iTotal)) { // printf("Now in %d, try %d, and %d is prime\n", iPos, ring[iPos], iTotal); // for(int i=0; iĦq =iPos; i++) // printf("%d ", ring[i]); // printf("\n\n"); if (FindNumber(iPos+1) == true) { // iPos -- } } iNumberTwo = GetNumber(iPos, iNumberTwo); } return false; }



LinkBack URL
About LinkBacks



ok thank you for replying, i understand those. and this is the whole program...