ALGORITMOS 22.docx

download ALGORITMOS 22.docx

of 6

Transcript of ALGORITMOS 22.docx

ENCONTRAR EL AREA DE UN CUADRADOENTRADA: LPROCESO: A=LxLSALIDA: AAlgoritmo1 inicio2 Escribir dame el valor del lado cuadrado3 Leer L4 Realizar A= LxL5 Escribir El rea del cuadrado es6 Escribir A 7 Fin.

ENCONTRAR EL AREA DE UN TRIANGULOENTRADA: base, altura PROCESO: A=(base x altura)/2SALIDA: AAlgoritmo1 inicio2 Escribir dame la base3 Leer base4 Escribir dame la altura5 Leer altura6 Realizar A=(base x altura)/2 7 Escribir el rea del triangulo es8 escribir A9 fin.

ARELI NECESITA LLEVAR EL CONTROL DE SUS CALIFICACIONES POR LO QUE REQUIERE CALCULAR EL PROMEDIO GENERAL.ENTRADA: 3 CALIFICACIONES X,Y,ZPROCESO: P=(Z+Y+Z)/3SALIDA: PAlgoritmo1 inicio2 Escribir dame la primera calificacin3 Leer cal14 Escribir dame la segunda calificacin5 Leer cal26 Escribir dame la tercera calificacin7 Leer cal38 Realizar P=(cal1+cal2+cal3)/39 Escribir el promedio es10 Escribir P11 fin.EL DUEO DE UNA EMPRESA QUIERE SABER EL KILOMETRAJE DEL VEICULO. INICIA EL DIA CON 3520KM, REGRESA CON 3616.CUANTOS KILOMETROS RECORRIO EL VEICULO?ENTRADA: 2 kilometrajes 1k 2kPROCESO: K=(2K-1K)SALIDA: KAlgoritmo1 inicio 2 Escribir dame los primeros kilmetros3 Leer 1k4 Escribir dame el segundo kilometraje5 Leer 2k6 Realizar K=(2K-1K)7 Escribir los kilometrajes recorridos son8 Escribir K9 fin.

PARA SACAR EL PERIMETRO DE UN POLIGONO IRREGULAR.ENTRADA: L1 NLPROCESO: L1SALIDA: PAlgoritmo1 inicio2 Escribir dame el numero de lados del polgono3 Leer NL4 Escribir dame la medida del lado5 Leer L16 Realizar P= L1+NL7 Escribir el permetro del polgono es8 Escribir P9 FIN.

SUMAR DOS NUMEROS.ENTRADA: NUM 1 NUM2PROCESO: S=NUM1+NUM2SALIDA: SAlgoritmo1 inicio 2 Escribir dame el primer nmero3 Leer num14 Escribir dame el segundo numero5 Leer num26 Realizar S=NUM1+NUM27 Escribir el resultado es8 Escribir S9 fin.