Created
June 4, 2022 15:17
-
-
Save ilmoralito/726907af7d24f70f83633f141eec52c2 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 | |
T = 10 | |
Dimension arreglo[T] | |
arreglo[0] <- 100 | |
arreglo[1] <- 20 | |
arreglo[2] <- 5 | |
arreglo[3] <- 1 | |
arreglo[4] <- 16 | |
arreglo[5] <- 3 | |
arreglo[6] <- 4 | |
arreglo[7] <- 5 | |
arreglo[8] <- 6 | |
arreglo[9] <- 15 | |
Para i <- 0 Hasta 8 Hacer | |
Para j <- 0 Hasta 8 Hacer | |
Si (arreglo[j] > arreglo[j + 1]) Entonces | |
aux <- arreglo[j] | |
arreglo[j] <- arreglo[j + 1] | |
arreglo[j + 1] <- aux | |
FinSi | |
FinPara | |
FinPara | |
Para i <- 0 Hasta T - 1 Hacer | |
Escribir "arreglo[",i,"]=",arreglo[i] | |
FinPara | |
FinAlgoritmo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment