Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/02/2009, 13:43
Tikitios
 
Fecha de Ingreso: mayo-2008
Ubicación: Chile
Mensajes: 189
Antigüedad: 16 años
Puntos: 3
Respuesta: Dibujar el tablero de sudoku en C++

#include <iostream>
#include <stdio.h>
#include <conio.h>

int main()
{
int x, y, n;

for(x=1; x<=9; x++)
{




for(y=1; y<=9; y++)
{
n=(rand()%9 +1);

gotoxy(x*3, y*2);
printf("%d",n);
gotoxy(x*3-1, y*2-1);
printf("|",n);
gotoxy(x*3-1, y*2-1);
printf("+",n);
gotoxy(x*3-1, y*2+1);
printf("|",n);
gotoxy(x*3, y*2-1);
printf("-",n);
gotoxy(x*3-1, y*2);
printf("|",n);
gotoxy(x*3+1, y*2-1);
printf("-",n);
}


}
printf("\n\n\n");
system("PAUSE");
}