13.07.2015 Views

LÓGICA DE PROGRAMACIÓN Grupo SOCRATES - Aves.edu.co

LÓGICA DE PROGRAMACIÓN Grupo SOCRATES - Aves.edu.co

LÓGICA DE PROGRAMACIÓN Grupo SOCRATES - Aves.edu.co

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

inicioMulti:=I*J;Writeln(I,' * ',J,' = ',Multi);fin;Writeln('');fin;Readln;Fin.1.8.2 Auto evaluación1.9 Ciclo repita (REPEAT)Este ciclo repetitivo maneja una pregunta de <strong>co</strong>ndición que se hace cada vez antesde finalizar el ciclo.Estructura:Lenguaje Algorítmi<strong>co</strong>‣ RepitaInstrucciones…;n…Instrucciones;Hasta (Condición);1.9.1 EjemploEjemplo de estructuras repetitivas Repita (Repeat - Until): Se pide un programadonde se ingresan una serie de números positivos, el último es un valor negativo.Se pide calcular la suma y el promedio de los valores positivos (no incluir el últimovalor), e imprimir los valores, la su suma y el promedio. El código del programa,dice:Programa ProNum;VarS, N, A, P: Real;BeginS := 0;N := 0;escriba ( 'Ingrese un valor ');lea (A);escriba ( 'El valor es : ',A );Repita

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!