Seminario introduttivo

1999 Roberto Anzellotti  - CASPUR

Creazione di pagine ASP -3

L'esempio seguente è L'Oracolotto II, ovvero l'esempio di prima con corretto il problema dei numeri ripetuti.

Questo esempio:

<HTML>
<HEAD>
<TITLE>L'ORACOLOTTO</TITLE>
</HEAD>

<BODY BGCOLOR=#FFFFFF>
<div align="center"><center>
<b>L'oracolotto</b>
<br>
<big><font color="#FF0000">
</font></big><br>

<strong>
<%=time()%> <br>
<%if time()<#1:00:00 PM# then x="Buongiorno " else x="Buonasera "%>
<%=x %>a te, o prode. <br>
La tua richiesta di aiuto mi è giunta e

<br>
la magica cinquina che ti indico è: </font></strong></p>
<div align="center"><center>

<table border="1" width="50%" align="Center">
<tr width="20%">

<%randomize
dim estratto(5)
logfile=""
for i = 1 to 5
do
test=0
numero = Int(90*rnd())+1
logfile=logfile & numero & ";"
for ii= 1 to i
if estratto(ii)=numero then test=1
next
loop while test=1
estratto(i)=numero
next %>

<%for i = 1 to 5 %>

<td><p align="center"><%=estratto(i)%> </td>
<%next %>

 

 

</tr>
</table>

</center></div>
<%=logfile%>
</div></div>

<br>
Che la fortuna ti assista!

<BR>
<BR>
</BODY>
</HTML>

<HTML>
<HEAD>
<TITLE>L'ORACOLOTTO</TITLE>
</HEAD>

<BODY BGCOLOR=#FFFFFF>
<div align="center"><center>
<b>L'oracolotto</b>
<br>
<big><font color="#FF0000">
</font></big><br>

<strong>
1:52:34 PM <br>

Buonasera a te, o prode. <br>
La tua richiesta di aiuto mi è giunta e


<br>
la magica cinquina che ti indico è: </font></strong></p>
<div align="center"><center>

<table border="1" width="50%" align="Center">
<tr width="20%">

 

 

 

 

 


<td><p align="center">40 </td>

<td><p align="center">23 </td>

<td><p align="center">61 </td>

<td><p align="center">29 </td>

<td><p align="center">37 </td>


</tr>
</table>

</center></div>
40;23;61;29;29;37;
</div></div>

<br>
Che la fortuna ti assista!

<BR>
<BR>
</BODY>
</HTML>

Consulta l'Oracolotto (funzionante)
oracolotto

Pagina precedente

Indice

Pagina successiva