ADVERTENCIA: LOS SIGUIENTES ALGORITMO SE ENTREGA "COMO SON" ("AS IS") SiN GARANTIA DE NINGUN TIPO. DEBE REALIZAR LAS VERIFICACIONES CORRESPONDIENTES ANTES DE EMPLEARLOS PARA CUALQUIER FIN. SOLO TIENEN UNA FINALIDAD EDUCATIVA.
jueves, 25 de octubre de 2012
Ejemplo de Algorimo para convertir Fahrenheit en Centigrados y viceversa (PseInt)
Proceso CelciusFahrenheit
Definir tipo como entero;
Definir temperatura como real;
Definir temperatura_dest como real;
Escribir "Desea efectuar la conversion de: ";
Escribir "1.- Fahrenheit a Centigrados";
Escribir "2.- Centigrados a Fahrenheit";
Leer tipo;
Si tipo = 1 Entonces
Escribir "ingrese temperatura en Fahrenheit: ";
Leer temperatura;
temperatura_dest <- (temperatura -32)*5/9;
Escribir "La temperatura en centigrados es: ",temperatura_dest;
Sino
Escribir "ingrese temperatura en Centigrados: ";
Leer temperatura;
temperatura_dest <- temperatura*9/5 + 32;
Escribir "La temperatura en fahrenheit es: ",temperatura_dest;
FinSi
FinProceso
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario