06.05.2013 Views

CONTENIDO DE LA LECCIÓN 18

CONTENIDO DE LA LECCIÓN 18

CONTENIDO DE LA LECCIÓN 18

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MIGUEL Á. TOLEDO MARTÍNEZ<br />

int buscaMinimo(int arreglo[], int tamano)<br />

{<br />

int pequeno = arreglo[0];<br />

Ejemplo <strong>18</strong>.24<br />

for (int i = 1; i < tamano; i++)<br />

if (arreglo[i] < pequeno)<br />

pequeno = arreglo[i];<br />

return pequeno;<br />

}//Fin de buscaMinimo()<br />

int buscaMaximo(int arreglo[], int tamano)<br />

{<br />

int grande = arreglo[0];<br />

void main(void)<br />

{<br />

for (int i = 1; i < tamano; i++)<br />

if (arreglo[i] > grande)<br />

grande = arreglo[i];<br />

return grande;<br />

}//Fin de buscaMaximo()<br />

int arreglo[MAX], numElementos;<br />

numElementos = obtenNumPuntos(MIN, MAX);<br />

// Pide datos al usuario<br />

for (int i = 0; i < numElementos; i++)<br />

{<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!