-
-
Save parzibyte/79a5846b5af87f048649a22ccb6ef7df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Algoritmo sin_titulo | |
Dimension numeros[200]; | |
Escribir "Ingrese la cantidad de datos: "; | |
Leer cantidad_elementos; | |
// Leer datos | |
Para i<-1 Hasta cantidad_elementos Hacer | |
Escribir "Ingrese el dato ",i,":" | |
Leer numeros[i] | |
FinPara | |
// Inicializar mayor y menor | |
mayor <- numeros[1] | |
menor <- numeros[1] | |
// Obtener mayor y menor | |
Para i<-1 Hasta cantidad_elementos Hacer | |
numero <- numeros[i] | |
Si numero > mayor Entonces | |
mayor = numero | |
FinSi | |
Si numero < menor Entonces | |
menor = numero | |
FinSi | |
FinPara | |
Escribir "Número mayor: ", mayor; | |
Escribir "Número menor: ", menor; | |
FinAlgoritmo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment