jueves, 9 de agosto de 2012

Programa de mostrar el signo zodiacal y si el año en que nacio es biciesto o no (visual Foxpro 6.0



dia=thisform.txtdia.value
mes=thisform.txtmes.value
año=thisform.txtaño.value
 edad=2010-año
 thisform.txtedad.value=edad

 b=1900
 for x=b to 2012
 b=b+4
 if año==b then
 thisform.txtañonac.value="Año Biciesto"
 else
 thisform.txtañonac.value="Año no Biciesto"
 endif
 endfor




 ma=20
 for x=ma to 32
 ma=ma+1
 if dia=ma.and.mes="Marzo"
 thisform.txtsigno.value="Aries"
 endif
 endfor
  m=1
 for x=m to 20
 m=m+1
 if dia=m.and.mes="Abril"
 thisform.txtsigno.value="Aries"
 endif
 endfor


 a=20
 for x=a to 31
 a=a+1
 if dia=a.and.mes="Abril"
 thisform.txtsigno.value="Tauro"
 endif
 endfor
  ab=1
 for x=ab to 21
 ab=ab+1
 if dia=ab.and.mes="Mayo"
 thisform.txtsigno.value="Tauro"
 endif
 endfor

 may=20
 for x=may to 32
 may=may+1
 if dia=may.and.mes="Mayo"
 thisform.txtsigno.value="Geminis"
 endif
 endfor
  j=1
 for x=j to 21
 j=j+1
 if dia=j.and.mes="Junio"
 thisform.txtsigno.value="Geminis"
 endif
 endfor



 ju=20
 for x=ju to 31
 ju=ju+1
 if dia=ju.and.mes="Junio"
 thisform.txtsigno.value="Cancer"
 endif
 endfor
  jul=1
 for x=jul to 20
 jul=jul+1
 if dia=jul.and.mes="Julio"
 thisform.txtsigno.value="Cancer"
 endif
 endfor



 julio=22
 for x=julio to 32
 julio=julio+1
 if dia=julio.and.mes="Julio"
 thisform.txtsigno.value="Leo"
 endif
 endfor
  ago=1
 for x=ago to 23
 ago=ago+1
 if dia=ago.and.mes="Agosto"
 thisform.txtsigno.value="leo"
 endif
 endfor



 ag=22
 for x=ag to 31
 ag=ag+1
 if dia=ag.and.mes="Agosto"
 thisform.txtsigno.value="Virgo"
 endif
 endfor
  sep=1
 for x=sep to 20
 sep=sep+1
 if dia=sep.and.mes="Septiembre"
 thisform.txtsigno.value="Virgo"
 endif
 endfor



s=22
 for x=s to 31
 s=s+1
 if dia=s.and.mes="Septiembre"
 thisform.txtsigno.value="Libra"
 endif
 endfor
  oct=1
 for x=oct to 23
 oct=oct+1
 if dia=oct.and.mes="Octubre"
 thisform.txtsigno.value="Libra"
 endif
 endfor




oc=22
 for x=oc to 31
 oc=oc+1
 if dia=oc.and.mes="Octubre"
 thisform.txtsigno.value="Escorpion"
 endif
 endfor
  nov=1
 for x=nov to 20
 nov=nov+1
 if dia=nov.and.mes="Noviembre"
 thisform.txtsigno.value="Escorpion"
 endif
 endfor




novi=21
 for x=novi to 31
 novi=novi+1
 if dia=novi.and.mes="Noviembre"
 thisform.txtsigno.value="Sagitario"
 endif
 endfor
  dic=1
 for x=dic to 22
 dic=dic+1
 if dia=dic.and.mes="Diciembre"
 thisform.txtsigno.value="Sagitario"
 endif
 endfor



 di=20
 for x=di to 31
 di=di+1
 if dia=di.and.mes="Diciembre"
 thisform.txtsigno.value="Capricornio"
 endif
 endfor
  en=1
 for x=en to 20
 en=en+1
 if dia=en.and.mes="Enero"
 thisform.txtsigno.value="Capricornio"
 endif
 endfor




 ene=19
 for x=ene to 31
 ene=ene+1
 if dia=ene.and.mes="Enero"
 thisform.txtsigno.value="Acuario"
 endif
 endfor
  feb=1
 for x=feb to 19
 feb=feb+1
 if dia=feb.and.mes="Febrero"
 thisform.txtsigno.value="Acuario"
 endif
 endfor



 f=20
 for x=f to 28
 f=f+1
 if dia=f.and.mes="Febrero"
 thisform.txtsigno.value="Piscis"
 endif
 endfor
  marzo=1
 for x=marzo to 22
 marzo=marzo+1
 if dia=marzo.and.mes="Marzo"
 thisform.txtsigno.value="Piscis"
 endif
 endfor

-Una vez ejecutado se nos mostrara de la siguiente forma:

 

3 comentarios:

  1. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  2. hola , he usado tu codigo y todo funciona bien excepto que no me dice el signo del zodiaco, me podrias ayudar ?

    ResponderEliminar
  3. Este comentario ha sido eliminado por el autor.

    ResponderEliminar