int main() { int i; for (i = 1; i <= 100; i++) { findSqrt(i); } return 0; }
/** * @overload sudukutree.h */ void checksubSqure(Suduku* suduku, SlotIndex* index, int* possibleValues) { // we want to find the root of the sub string to check for PossibleValues int sqrt = findSqrt(suduku->tableSize); int subSqureRow = (int)(index->row / sqrt)*(sqrt); int subSqureCol = (int)(index->col / sqrt)*(sqrt); int col, row, slotVal; for(row = subSqureRow; row < subSqureRow + sqrt; row++) { for(col = subSqureCol; col < subSqureCol + sqrt; col++) { slotVal = suduku->table[TABLE(suduku->tableSize, row, col)]; if(slotVal != EMPTY_SLOT_VAL) { possibleValues[slotVal - 1]++; } } } }