CONTENIDO DE LA LECCIÓN 18
CONTENIDO DE LA LECCIÓN 18
CONTENIDO DE LA LECCIÓN 18
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