Hi all
I have a little problem and need help please,
As you can see, When i click on replace random, i would like to replace the 3 generated numbers in different place .
Like in this exemple bt1=17 bt2=12 bt3=24, i would like numbers changing place.
Thanks in advance
I have a little problem and need help please,
B4X:
Sub bt1_Click
tirage1
End Sub
Sub tirage1
resa=Rnd(1,50)
lba.Text=resa
tirage2
End Sub
Sub tirage2
resb=Rnd(1,50)
lbb.Text=resb
If resb<>resa Then
tirage3
Else
tirage2
End If
End Sub
Sub tirage3
resc=Rnd(1,50)
lbc.Text=resc
If resc<>resb AND resc<>resa Then
tirageok
Else
tirage3
End If
End Sub
Sub tirageok
resultlbl.Text="TIRAGES OK"
End Sub
Sub btreplace_Click
storenombres.AddAll(Array As Int(resa,resb,resc))
button1.text=resa
button2.text=resb
button3.text=resc
End Sub
As you can see, When i click on replace random, i would like to replace the 3 generated numbers in different place .
Like in this exemple bt1=17 bt2=12 bt3=24, i would like numbers changing place.
Thanks in advance