
30/05/2006, 02:58
|
 | | | Fecha de Ingreso: mayo-2006
Mensajes: 42
Antigüedad: 18 años, 8 meses Puntos: 0 | |
bueno ahora sin duda alguna termine de resolver el problema de mostrar en el existe :P
//------------ Ingresar -----------
void ingresar (int n)
{
if(filas<4)
{
int existe1,existe2,foco=0;
for(x=0;x<4;x++)
{
for(y=0;y<4;y++)
{
if(numeros[x][y]==n)
{
foco=1;
existe1=x;
existe2=y;
}
}
}
if(foco==0)
{
numeros[filas][columnas]=n;
mostrar();
columnas++;
}
else
{
for(x=0;x<4;x++)
{
for(y=0;y<4;y++)
{
if((existe1==x))
{
if(existe2==y)
{
cout<<"->"<<numeros[x][y]<<"<-Existe ";
}
else
{
cout<<numeros[x][y]<<" ";
}
}
else
{
cout<<numeros[x][y]<<" ";
}
}
cout<<"\n";
}
}
}
else
{
cout<<"Matriz llena \n";
}
}
;) |