ho bisogno di generare numeri casuali interi compresi in un intervallo da 1 a 90.
![]()
ho bisogno di generare numeri casuali interi compresi in un intervallo da 1 a 90.
![]()
così stampo 6 numeri da 0 a 1.
<%
Randomize
Dim i
for i=0 to 5
Response.Write(FormatNumber(Rnd(),2)&"
")
next
%>
Randomize
numero = Int(Rnd*90) + 1
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
così stampo 5 numeri uguali
<%
Randomize
numero = Int(Rnd*90) + 1
Dim i
for i=0 to 5
Response.Write(FormatNumber(numero,2)&"
")
next
%>
<%
for i=0 to 5
Randomize
numero = Int(Rnd*90) + 1
Response.Write(FormatNumber(numero,2)&"
")
next
%>
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
Questo ti stampa 5 numeri interi tra 0 e 90:
<%
for i=1 to 5
Randomize
numero = Int(Rnd*90) + 1
Response.Write(FormatNumber(numero,0)&"
")
next
%>
Nell'esempio che ti ho dato può capitare che delle volte ti duplichi 2 numeri, ma è un caso raro