Sub compteur()
b = 2531011
m = 2 ^ 24
n = InputBox("nombre d'éléments")
bInf = InputBox("la borne inf")
bSup = InputBox("la borne sub")
x = 1
For i = 1 To n
x = (bInf * x + b) Mod m
resultat = x * (bSup - bInf) / m + bInf
MsgBox (resultat)
Next
End Sub