Nomb=true

Philibert - 15 juil. 2000 à 09:49
 amonbofis - 15 juil. 2000 à 21:29
je fais:

function Nomb
if intNb1 <> intNb2 then
Nomb=true
else
Nomb=false
end if
end function

do
intNb2 = int(rnd * (100))
loop while intNb2 = 0 and Nomb=true

mais rien à faire! il s'en fout completement et souvent intNb1=intNb2
comment faire ??? merci

1 réponse

Public Function Nomb (ByVal IntNb1 As Integer, ByVal intNb2 As Integer) As Boolean
If (intNb1 <> intNb2) Then Nomb = True
End Function

Randomize
Do
intNb2 = int (Rnd * 100) + 1
Loop While Nomb

Une solution parmis tant d'autres...
0
Rejoignez-nous