domingo, 29 de noviembre de 2009

algoritmos de si es hombre o mujer

inicio
imprima "h= hombre o m=mujer
lea resp
if(resp=h)
then
imprima"digite la edad"
lea edad
if(edad menor=20)o(edad mayor=35)
imprima"puede aspirar al cargo"
else
imprima" no puede aspirar al cargo"
else
imprima " es una mujer"
fin







inicio
imprima "h= hombre o m=mujer
lea resp
if(resp=h)
then
imprima"digite la edad"
lea edad
if(edad menor=18)o(edad mayor=21)
imprima"puede aspirar al cargo"
else
imprima" no puede aspirar al cargo"
else
imprima " un hombre "
fin






inicio
imprima "h= hombre o m=mujer
lea resp
if(resp=h)
then
imprima"digite la edad"
lea edad
if(edad menor=40)
imprima"puede aspirar al cargo"
else
imprima" no puede aspirar al cargo"
else
imprima " es un hombre "
fin





inicio
imprima "h= hombre o m=mujer
lea resp
if(resp=h)
then
imprima"digite la edad"
lea edad
if(edad menor=18)o(edad mayor=21)
imprima"puede aspirar al cargo"
else
imprima" no puede aspirar al cargo"
else
imprima " es una mujer "
fin

domingo, 8 de noviembre de 2009

ALGORITMO DE LA ECUACION

inicio
" imprima variables"
lea a
if(a=1)
then
" imprima(y=mx+b)"
else
if(a=2)
then
" imprima(y=a*2+b*+c)
else
if(a=3)
then
" imprima (y=a*3+b*2+c*+d)"

FIN

jueves, 5 de noviembre de 2009

inicio
imprima "el numero de mes"
lea numero
if( numero=1)
then
imprima" enero"
if ( numero =2) then
imprima "febrero"
if ( numero=3)
then
imprima" marzo"
if ( numero =4)
then
imprima"abril"
if (numero = 5)
then
imprima"mayo"
if (numero=6)
then
imprima" (junio)
if (numero=7)
then
imprima"(julio)
if (numero =8)
then
imprima "agosto"
if(numero=9)
then
imprima" septiembre"
if (numero =10)
then
imprima"octubre"
if (numero=11)
then
imprima"noviembre"
if (numero = 12)
then
imprima" diciembre"

fin

algoritmo de una figura geometrica

1.- inicio
2.- pedir la base y la altura (B,H)
3.- multiplicar la base y la altura y dividirlas entre 2 (A=B*H/2)
4.- mostrar resultados (A)
5.- fin

domingo, 1 de noviembre de 2009