top of page

ALGORITMO CON CONDICIONALES:

​

Captura4.PNG
Captura.PNG
Captura5.PNG
Captura6.PNG

Diagrama de flujo:

​

Captura11.PNG

​Algoritmo multiple
    Definir OPCIONES Como Entero
    Escribir '********MENU********'
    Escribir '1)******POTENCIA*****'
    Escribir '2)******VELOCIDAD INICIAL****'
    Escribir '3)*******VOLTAJE*********'
    Escribir '4)*******ENERGIA POTENCIAL****'
    Escribir '5)***ENERGIA CINEIICA********'
    Escribir 'INGRESE OPCION*****'
    Leer OPCIONES
    Segun OPCIONES  Hacer
        1:
            // DECLARACION 
            Definir w,a,r Como Real
            // ASIGANCION
            Escribir 'ingrese intensidad '
            Leer a
            Escribir 'ingrese resistencia '
            Leer r
            Si (a>0 Y r>0) Entonces
                w <- (a^2*r)
                // RESULTADO
                Escribir 'la potencia es :',w
            SiNo
                Escribir 'accion invalidad a y b > 0 '
            FinSi
        2:
            // DECLARACION
            Definir vi,vf,a,t Como Real
            // ASIGNACION
            Escribir 'ingrese aceleraacion'
            Leer a
            Escribir 'ingrese velocidad final'
            Leer vf
            Escribir 'ingrese el timepo'
            Leer t
            Si (a>10 Y a<20) Entonces
                vi <- vf-(a*t)
                // RESULTADO
                Escribir 'la respuesta es:',vi
            SiNo
                Escribir 'valor ingresado incorrepto debe de estar en el rango de 1o<a<20'
            FinSi
        3:
            // DECLARACION
            Definir v,i,r Como Real
            // ASIGNACION 
            Escribir ' ingrese la resistenca de corriente'
            Leer i
            Escribir 'ingrese la resistencia '
            Leer r
            // proceso 
            Si (0.1<i Y i<100) Entonces
                v <- r*i
                // RESULTADO
                Escribir 'el VOLTAJE ES: ',v
            SiNo
                Escribir 'valores entre 0.1<i100 '
            FinSi
        4:
            // DECLARACION 
            Definir ep,m,g,h Como Real
            // DEFINIR
            Escribir ' ingrese el valor de la masa'
            Leer m
            Escribir 'ingrese gravedad'
            Leer g
            Escribir 'ingrese altura en metros'
            Leer h
            // PROCESO 
            Si (h>0 Y 1000<h) Entonces
                ep <- m*g*h
                // RESULTADO 
                Escribir 'LA ENERGIA POTENCIAL ES :',e
            SiNo
                Escribir 'ERROR DE VALORES ADMITIDOS '
            FinSi
        5:
            // DECLARACION 
            Definir ec,m,v Como Real
            // DEFINIR 
            Escribir 'ingrese velocidad '
            Leer v
            Escribir 'ingrese masa '
            Leer m
            // PROCESO 
            Si (m>0.1 Y 50<m) Entonces
                ec <- 1/2*m*v^2
                // RESULTADO 
                Escribir 'ENERGIA CINETICA ES :',ec
            SiNo
                Escribir 'VALORES FUERA DE RANGO'
            FinSi
    FinSegun
FinAlgoritmo

bottom of page