SoloCodigo

Programación General => Delphi => Mensaje iniciado por: kllejero911 en Viernes 2 de Junio de 2006, 14:57

Título: Codigo Fuente Del Sodoku
Publicado por: kllejero911 en Viernes 2 de Junio de 2006, 14:57
Alguien me puede ayudar con el codigo fuente del sodoku en delphi porfavor ?? :comp:
Título: Re: Codigo Fuente Del Sodoku
Publicado por: Enko en Viernes 2 de Junio de 2006, 23:40
En este foro no se hacen tareas.

Si tienes problemas al escribir tu código, no dudes en preguntar lo que te haga falta.
Título: Re: Codigo Fuente Del Sodoku
Publicado por: zeraf_ en Martes 6 de Junio de 2006, 05:30
Código: Text
  1.  
  2. void ubicar(int i, int j, matriz mat)
  3. {
  4.   int x;
  5.   if (i < 9) {
  6.     if (j < 9) {
  7.       if(mat[i][j] == -1) {
  8.         for(x = 1; x <= 9; x++) {
  9.           if(NOenfila(x, i, mat) && NOencolumna(x, j, mat) && NOenmatriz(x, i, j, mat)) {
  10.             mat[i][j] = x;
  11.             ubicar(i, j+1, mat);
  12.             mat[i][j] = -1;
  13.           }
  14.         }
  15.       }
  16.       else
  17.         ubicar(i, j+1, mat);
  18.     }
  19.     else
  20.       ubicar(i+1, 0, mat);
  21.   }
  22.   else
  23.      mostrar(mat);
  24. }
  25.  
  26.  

Es tarea pasarlo a Delphi, y terminarlo  :P .  :comp:

 :scream: