求用C语言解一个简单sudoku数独的程序
发布网友
发布时间:2022-04-24 23:37
我来回答
共1个回答
热心网友
时间:2022-04-25 01:07
void readGame (sukoGrid game) {
cell currentCell = 0;
int inChar = getchar();
while (inChar != EOF) {
if (
((inChar >= MIN_VALUE) && (inChar <= MAX_VALUE)) ||
(inChar == EMPTY_VALUE)
) {
assert (currentCell <= MAX_CELL);
game [currentCell] = inChar;
currentCell++;
}
inChar = getchar();
}
assert (currentCell == (MAX_CELL+1));
}
第一个readgame,谁会别的?