Algoritmo pseugocódigo
ALGORITMO Como hacer un desayuno andaluz
INCIO Prepara los ingredientes.
1. Pan
2. Aceite
3. Tomate
4. Jamón
Ralla el tomate
SI NO hay suficiente, ralla tomate,
SI hay suficiente ENTONCES
Corta el jamón
SI NO hay suficiente, corta el jamón,
SI hay suficiente ENTONCES
Tuesta el pan
SI NO está suficientemente tostado, tuesta el pan
SI está suficientemente tostado ENTONCES
Écha aceite al pan
SI NO hay suficiente, echa aceite al pan
SI hay suficiente ENTONCES
Echa tomate al pan
SI NO hay suficiente, echa aceite al pan
SI hay suficiente ENTONCES
Pon jamón encima
SI NO hay suficiente, pon jamón encima
SI hay suficiente ENTONCES
¡Ya tienes lista tu tostada!
¿Qué hace este pseudocógido?
El código cuenta los números del 1 al 100, incrementándose en 1 en cada repetición.
INCIO Prepara los ingredientes.
1. Pan
2. Aceite
3. Tomate
4. Jamón
Ralla el tomate
SI NO hay suficiente, ralla tomate,
SI hay suficiente ENTONCES
Corta el jamón
SI NO hay suficiente, corta el jamón,
SI hay suficiente ENTONCES
Tuesta el pan
SI NO está suficientemente tostado, tuesta el pan
SI está suficientemente tostado ENTONCES
Écha aceite al pan
SI NO hay suficiente, echa aceite al pan
SI hay suficiente ENTONCES
Echa tomate al pan
SI NO hay suficiente, echa aceite al pan
SI hay suficiente ENTONCES
Pon jamón encima
SI NO hay suficiente, pon jamón encima
SI hay suficiente ENTONCES
¡Ya tienes lista tu tostada!
¿Qué hace este pseudocógido?
ALGORITMO a1
DATOS
contador
INICIO
contador = 1
REPETIR 100 veces
ESCRIBIR contador
INCREMENTAR en 1 contador
FIN REPETIR
FIN
Comentarios
Publicar un comentario