The C language can only realize the Sudoku program.
This article mainly introduces the relevant knowledge of "C language can only realize the unique program of solving numbers". The editor shows you the operation process through the actual case, the operation method is simple and fast, and the practicality is strong. I hope that this article "C language can only realize the unique program of solving numbers" can help you solve the problem.
A program for solving Sudoku written in C language. The test runs successfully under linux.
The effect is as shown in the figure:
This is Sudoku with a solution, and the part that needs to be filled in is replaced by the number 0.
This is the effect picture after the program is running. Look, Sudoku is done.
The source code of the program is as follows:
# include # include # define SIZE 9#define get_low_bit (x) ((~ x & (xmer1)) + 1) struct {int left; char num; char try;} board [SIZE] [SIZE]; int bit2num (int bit) {switch (bit) {case 1:case 2: return bit; case 4: return 3; case 8: return 4; case 16: return 5; case 32: return 6; case 64: return 7; case 128: return 8; case 256: return 9 }} void printf_res () {int I, j, k; for (iTuno; I