martes, 29 de marzo de 2011

Trabajo

Problema Nº 1:
Ingresa un nº: 123
124 te gané
Solución:
Proceso te_gane
Escribir "Ingresa un Numero:";

Leer uno;
Escribir uno + 1, " Te gane";
FinProceso



Problema Nº 2:
Calcular área y perímetro de rectángulo
Largo? …
Ancho? …
Area=nº Perímetro=nº
Solución:
Proceso calculo_area_perimetro
Escribir "Largo?";
Leer largo;
Escribir "Ancho?";
leer ancho;
Escribir "Area=",largo*ancho," Permimetro=",(2*largo)+(2*ancho);

FinProceso




Problema Nº 3:
Suma de fracciones: a/b + c/d
a ? 1
b ? 2
c ? 3
d ? 4
suma = 10/8 = 1 2/8 = 1.25
Solución:
Proceso fracciones
Escribir "a?";
Leer a;
Escribir "b?";

Leer b;
Escribir "c?";
Leer c;
Escribir "d?";
Leer d;
Escribir "Suma=",(a/b)+(c/d);
FinProceso

No hay comentarios:

Publicar un comentario