Algoritmos Sencillos

Páginas: 2 (414 palabras) Publicado: 20 de julio de 2012
ALGORITMO
1- Inicio
2- Leer s, e, p y h
3- Pedir horas trabajadas
4- Si h<40 si no P7
5- h*pago=s
6- Imprime salario total
7- si h<40
8- h-40=e
9- Imprimehoras extra
10- Mientras h=(40*pago)+[(e*1’5)+pago]
11- Imprime salario total
12- Fin
INICIO
INICIO
DIAGRAMA DE FLUJO
SALARIO TOTAL+ EXTRA
SALARIO TOTAL+ EXTRA
(40*p)+[(e*1.5)*p](40*p)+[(e*1.5)*p]
h-40=e
h-40=e
FIN
FIN
SALARIO TOTAL
SALARIO TOTAL
h*p
h*p
LEER s, p, h, e.
LEER s, p, h, e.
Si h<40
Si h<40

NO

SI

ALGORITMO
* Inicio
*Leer he
* Leer hs
* Estancia Ç= hs-he
* Si (estancia>0 &&<=1) entonces imprime “tu tarifa es de $100”. Si no hm=estancia-1 y mientras i=0.01;i<=hm;i++) realiza a=a+60,después realizar pago=a+100 e imprime “tu tarifa es de $” pago;
* Fin
FIN
FIN
TU TARIFA ES DE:
TU TARIFA ES DE:
Ce+100
Ce+100
(i=0.01; i<=hm; i++)
(i=0.01; i<=hm; i++)
Hm=estancia-1
Hm= estancia-1
INICIO
INICIO
LEER he, hs
LEER he, hs
Estancia=hs-he
Estancia=hs-he
Estancia >0&&<=1
Estancia >0&&<=1

NO

SI

Algoritmo

1.- Inicio2.- Leer Boletos
3.- si (boletos >=1 y <=3) entonces total=boletos*80;
Si no si (boletos>3 y <=10) entonces: (total=boletos * 80) *0.70;
Si no si (boletos>10 y <=20) entonces:(total=boletos*80)*0.50;
Si no total= (boletos *80) *0.40;
4.- Imprime (“El total es: $” + total);
5.- fin.
no
no
no
no
no
no
si
si
si
si
si
si
FIN
FIN
“el total a pagar es de: $”,total.
“el total a pagar es de: $”, total.
Total =(boletos*80)*0.40
Total =(boletos*80)*0.40
Total =(boleto*80)*0.70
Total =(boleto*80)*0.70
boletos>3&& <=10
boletos>3&&<=10
Total = boletos*80
Total = boletos*80
Total =(boletos*80)*0.40
Total =(boletos*80)*0.40
Boletos>10&&<=20
Boletos>10&&<=20
Boletos>=1 && <=3...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Ejemplo de algoritmos sencillos
  • sencillo
  • sencillo
  • sencillo
  • Algoritmo
  • Algoritmo
  • Algoritmo
  • Algoritmos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS