Salve a tutti, sono uno studente e attraverso il Vbscript dovevo creare un programma per calcolare l'ascendente, ho utilizzato la guida del sito, ma oltre al segno zodiacale non va... Posto il codice se qualcuno mi spiegasse dove ho sbagliato mi farebbe un enorme piacere
codice:
<html>
<head><title>Segno Zodialcale e Ascendente</title></head>
<body>
<script language="VBScript">
<!--
a=inputbox("Giorno in cui sei nato")
b=inputbox("Mese in cui sei nato in numeri")
c=inputbox("Ora in cui sei nato (esempio 00.45)")
z=inputbox("Sei del Nord, Sud o Centro Italia?(esempio Sud)")
if a>20 and b=3 or a<20 and b=4 then
document.write "il tuo segno zodiacale è Ariete"
elseif a>19 and b=4 or a<21 and b=5 then
document.write "il tuo segno zodiacale è Toro"
elseif a>20 and b=5 or a<21 and b=6 then
document.write "il tuo segno zodiacale è Gemelli"
elseif a>20 and b=6 or a<22 and b=7 then
document.write "il tuo segno zodiacale è Cancro"
elseif a>22 and b=7 or a<23 and b=8 then
document.write "il tuo segno zodiacale è Leone"
elseif a>22 and b=8 or a<23 and b=9 then
document.write "il tuo segno zodiacale è Vergine"
elseif a>22 and b=9 or a<23 and b=10 then
document.write "il tuo segno zodiacale è Bilancia"
elseif a>22 and b=10 or a<22 and b=11 then
document.write "il tuo segno zodiacale è Scorpione"
elseif a>21 and b=11 or a<22 and b=12 then
document.write "il tuo segno zodiacale è Sagittario"
elseif a>21 and b=12 or a<20 and b=1 then
document.write "il tuo segno zodiacale è Capricorno"
elseif a>19 and b=1 or a<19 and b=2 then
document.write "il tuo segno zodiacale è Acquario"
elseif a>18 and b=2 or a<21 and b=3 then
document.write "il tuo segno zodiacale è Pesci"
end if
//-->
</script>
<script language="VBScript">
<!--
if b=1 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
elseif b=2 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*28)))
elseif b=3 then
d=(6.34+4*((cint (a)+((cint(b)-1)*31)))
elseif b=4 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*30)))
elseif b=5 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
elseif b=6 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*30)))
elseif b=7 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
elseif b=8 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
elseif b=9 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*30)))
elseif b=10 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
elseif b=11 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*30)))
elseif b=12 then
d=(6.34+0.04*((cint (a)+((cint(b)-1)*31)))
end if
//-->
</script>
<script language="VBScript">
e=cint(c)+cint(d)
if e>=24.00 then f=e-24
else e=f
end if
</script>
<script language="VBScript">
if z=Nord then g=f-0.20
elseif z=centro then g=f-0.10
end if
</script>
<script language="VBScript">
if g>=00.34 and g<=03.17 then
document.write "il tuo ascendente è Leone"
if g>=03.18 and g<=06.00 then
document.write "il tuo ascendente è Vergine"
if g>=06.01 and g<=08.43 then
document.write "il tuo ascendente è Bilancia"
if g>=08.44 and g<=11.25 then
document.write "il tuo ascendente è Scorpione"
if g>=11.26 and g<=13.53 then
document.write "il tuo ascendente è Sagittario"
if g>=13.54 and g<=15.43 then
document.write "il tuo ascendente è Capricorno"
if g>=15.44 and g<=17.00 then
document.write "il tuo ascendente è Acquario"
if g>=17.01 and g<=18.00 then
document.write "il tuo ascendente è Pesci"
if g>=18.01 and g<=18.59 then
document.write "il tuo ascendente è Ariete"
if g>=19.00 and g<=20.17 then
document.write "il tuo ascendente è Toro"
if g>=20.18 and g<=22.08 then
document.write "il tuo ascendente è Gemelli"
if g>=22.09 and g<=00.34 then
document.write "il tuo ascendente è Cancro"
end if
//-->
</script>
</body>
</html>
Vi do una breve spiegazione sul calcolo così magari potete controllarlo meglio
Allora all'ora della data di nascita va sommato il tempo siderale che sarebbe un'ora che corrisponde a un giorno dell'anno , ho visto che approssimativamente parte dalle 6.34 il primo gennaio e aumenta di 4 minuti al giorno. Se questo numero dupera 24 deve essere sottratto 24, se sei del nord vanno sottratti 20 min del centro 10 e del sud niente. In base al risultato ci sono le fasce di risultati che corrispondono all'ascendete...
Ho letto il regolamenteo e mi scuso in anticipo se ho sbagliato a postare
Grazie MIlle