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 mcm | |
Definir resultado, maxExponente, i, j Como Entero | |
Dimension lista[5] | |
Dimension listaPrimo[5] | |
listaPrimo[1] <- 2 | |
listaPrimo[2] <- 3 | |
listaPrimo[3] <- 5 |
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
Funcion ordenar(lista Por Referencia) | |
mayor = lista[1] | |
para i <- 2 Hasta 4 Hacer | |
si lista[i] > mayor | |
mayor = lista[i] | |
FinSi | |
FinPara | |
FinFuncion | |
Algoritmo ordena |
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
Funcion organizar(a Por Referencia,b Por Referencia,c Por Referencia) | |
cambios<-0; | |
Si a > b entonces | |
cambios <- a | |
a <- b | |
b <- cambios | |
FinSi | |
Si a > c entonces |
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
Funcion principal(matriz) | |
para i<-1 Hasta 3 Hacer | |
para j<-1 Hasta 3-1 Hacer | |
para x=j+1 Hasta 3 Hacer | |
si matriz[i,x]< matriz[i,j] Entonces | |
save = matriz[i,j] | |
matriz[i,j]=matriz[i,x] | |
matriz[i,x] = save | |
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
Funcion mayores<-ordenamiento(lista) | |
definir i, save Como entero | |
para i<-1 Hasta 3-1 Hacer | |
guardar=i | |
para j=i+1 Hasta 3 Hacer | |
si lista[j]<lista[guardar] Entonces | |
guardar=j | |
FinSi |
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
Funcion tabla(x Por Referencia) | |
Definir mult,i Como Entero | |
para i = 1 Hasta 10 Hacer | |
Escribir "tabla de multiplicar" ; | |
para mult=1 Hasta 10 Hacer | |
x=i*mult | |
Escribir i,"*",mult,"=",x; | |
FinPara | |
FinPara |
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
Funcion verificar(x Por Referencia) | |
para i=1 Hasta x Hacer | |
si x%i=0 Entonces | |
cont=cont+1 | |
FinSi | |
FinPara | |
si cont=2 Entonces |
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
Funcion incrementoPorValor(x Por Valor) | |
x<-x+1 | |
FinFuncion | |
Funcion incrementoPorReferecia(x Por Referencia) | |
x<-x+1 | |
FinFuncion | |
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
//funciones que necesito | |
//suma,resta,multipilicacion,division | |
Funcion suma(x,z,resultado Por Referencia) | |
resultado=x+z | |
FinFuncion | |
Funcion resultado<-resta(x,z) | |
Definir resultado Como Entero |
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 oculta | |
Definir palabra Como caracter | |
definir contador,conversion,espacio Como Entero | |
escribir "escribe una frases" | |
Leer palabra | |
conversion = Longitud(palabra) | |
frase = Subcadena(palabra,1,1) | |
para i<-1 Hasta conversion Hacer |