Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool SudokuSolver(int tab[9][9],int position){
- int s=0,p=0,i,j,nb;
- if(position==81){
- return true;
- }
- else if(CaseVide(tab,&i,&j)==true){
- for(nb=1;nb<10;nb++){
- if(!EstPresentC(tab,s,nb) && !EstPresentL(tab,s,nb) && !EstPresentR(tab,s,p,nb)){
- tab[i][j]=nb;
- if(SudokuSolver(tab,position+1)==true){
- return true;
- }
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement