Sub test()
Dim recommence As String, i As Byte, x As Byte, p As String, q As String, score As Byte
Randomize
Do
For i = 1 To 10
x = Round(Rnd, 0)
p = IIf(x, "pile", "face")
q = InputBox("Rentrez pile ou face")
MsgBox IIf(p = q, "bonne réponse", "mauvaise réponse")
If p = q Then score = score + 1
Next
MsgBox "Vous avez gagné " & score & " fois !!!"
score = 0
recommence = InputBox("voulez vous rejouez O/N")
Loop While recommence = "O"
End Sub