You are on page 1of 4

ALGORITMOS

1. DETERMINE EL DESCUENTO DE UN ARTICULO POR MEDIO DE LA CANTIDAD, SI


COMPRAS MAS DE 5 ARTICULOS TIENE UN 5% DE DESCUENTO, EN CASO
CONTRARIO NO TIENE DESCUENTO

(SE LEE PRECIO Y CANTIDAD)

Inicio (Variables cant, precio, desc, total, total_1


Desc1 0
Escriba “Cantidad artículos”
Leer cant
Escriba “Digite el precio”
Leer precio
total cant * precio
Si cant > 5 entonces
Desc (total * 5)/100
Total_1 res – desc
Escribir “El descuento es”, desc
Escribir “El total es”, total_1
Sino
Escribir “El descuento es:”, desc1
Escribir “El total es”, total
Fin (si)
Fin (inicio)

2. DETERMINE LA CANTIDAD DE HORAS EXTRAS QUE SE LE PAGAN A UN


EMPLEADO QUE TRABAJA 60 HORAS Y EL MAXIMO ES 48 HORAS.

Inicio (Variables H_extra, H_max, H_trab)


H_max 48
H_trab 60
H_extra H_trab – H_max
Escriba “La cantidad de horas extras son: “, H_extra
Fin (inicio)

3. REALICE UN ALGORITMO QUE SOLICITE AL USUARIO DOS VALORES


NUMERICOS Y CALCULE

EL VALOR MEDIO, QUE ES LA SUMA DE AMBOS DIVIDIVOS EN 2.


Inicio (num1, num2, res
Escriba “Digite un numero”
Leer num1
Escriba “Digite un numero”
Leer num2
Res ( num1 + num2 ) / 2
Escriba “El valor medio es: “, res
Fin (inicio)
4. REALICE UN ALGORTIMO QUE CALCULE UN VALOR DE TIPO NUMERICO QUE
NOS INDIQUE EL PESO RELATIVO DE UNA PERORNA. EL ALGORITMO
SOLICTARA AL USUARIO SU DATOS (NOMBRE, EDAD, PESO Y ALTURA), EL PESO
RELATIVO SE CALCULA DIVIDIENDO EL PESO POR EL CUADRADO DE LA ALTURA.

Inicio ( Variables nombre, edad, peso, atura, p_relativo)


Escriba “Digite su nombre”
Leer nombre
Escriba “Digite su edad”
Leer edad
Escriba “Digite su peso”
Leer peso
Escriba “Digite su altura”
Leer altura
P_relativo (peso / altura ^2)
Escriba “EL peso relativo es”, p_relativo
Fin (inicio)

5. LEA TRES NUMEROS Y DETERMINE EL MAYOR DE LOS TRES.

Inicio ( Variables num1, num2, num3, res


Escriba “Digite un numero”
Leer num1
Escriba “Digite otro numero”
Leer num2
Escriba “Digite otro numero”
Leer num3
Si num1 > num2 entonces
Res num1
Sino
Res num2
Fin (si)
Si res > num3 entonces
Escriba “El numero mayor es”, res
Sino
Escriba “El numero mayor es”, num3
Fin (si)
Fin (inicio)
6. LEA TRES NUMEROS Y DETERMINE EL PROMEDIO DE LOS TRES NUMEROS

Inicio (Variables num1, num2, num3, promedio)


Escriba “Digite un numero”
Leer num1
Escriba “Digite otro numero”
Leer num2
Escriba “Digite otro numero”
Leer num3
Promedio (num1 + num2 + num3)/3
Escriba “El promedio es”, promedio
Fin (inicio)

7. DETERMINAR LA SUMA DE DOS NUMEROS ENTEROS

Inicio ( Variables num1, num2, res)


Escribir “Digite un numero”
Leer num1
Escribir “Digite otro numero”
Leer num2
Res num1 + num2
Escribir “El resultado es”, res
Fin (incio)

8. DETERMINE SI UN NUMERO ES PAR

Inicio ( Variables num, res)


Escribir “Digite un numero”
Leer num
Res num mod 2
Si res = 0 entonces
Escribir “Es par”
Sino
Escribir “NO es par”
Fin (Si)
Fin (inicio)
9. ESCRIBA UN ALGORTIMO QUE EVALUE LA SIGTE. EXPRESION

(a + 7 * c) / (b + 2 - a) + 2 * b, donde a = 3 , b = 6 , c = 4

Inicio ( Variables a, b, c, res)


a 3,b 6,c 4,
res (a + 7 * c) / (b + 2 - a) + 2 * b
Escribir “El resultado es: “, res
Fin (inicio)

10. REALICE UN ALGORITMO QUE DETERMINE SI UN NUMERO ES PRIMO.


Inicio (Variables cont 1, num, i o, Res 0)
Escriba “Digite un numero”
Leer num
Mientras con < = num haga
Resp num mod cont
Cont cont + 1
Si res = 0 entonces
i i+1
Fin (si)
Fin (mientra)
Si (i = 2 ) entonces
Escriba “Este numero es Primo”
Sino
Escriba “Este numero NO es primo”
Fin (si)
Fin (inicio)

11. HAGA UN ALGORITMO QUE DETERMINE SI UN NUEMRO ES IGUAL A CERO

Inicio (Variables num)


Escriba “Digite un numero”
Leer num
Si num = 0 entonces
Escriba “Este numero igual a Cero”
Sino
Escriba “Este numero NO es igual a Cero”
Fin (si)
Fin (inicio)

You might also like