//MARTES 29 DE SEPTIEMBRE DEL 2009
//SUMAR DIAGONALES DE UN ARREGLO
void sumardiagonales(int *d)
{
int c=0;
for(int x=0; x<renglones; x++)
{
cout<<"n"<<*(d+x+c);
c=c+columnas;
}
}
//SUMAR DIAGONALES DE UN ARREGLO INVERTIDO
void sumardiagonalesinvertida(int *d)
{
int c=columnas-1;
for(int x=0; x<renglones; x++)
{
cout<<"n t"<<*(d+c);
c=c+columnas-1;
}
}
//MUESTRAR EN PANTALLA EL ARREGLO
void mostrararreglo()
{
for(int x=0; x<renglones; x++)
{
for(int y=0; y<columnas; y++)
{
gotoxy(5+y,5+x); cout<<arreglo[x][y];
}
}
}
//GENERAR NUMEROS ALEATORIOS EN UN ARREGLO
void numerosaleatorios(int *n)
{
randomize();
for(int x=0; x<renglones*columnas; x++)
{
*(n+x)=random(9);
}
}
//INICIALIZA UN ARREGLO
void inicializar(int *i)
{
for(int x=0; x<renglones*columnas; x++)
{
*(i+x)=0;
}
}
CUALQUIER DUDA O CORRECCION PUEDEN DEJAR SU COMENTARIO COMO ANONIMO
ESPERO Y LES HALLA SERVIDO 🙂