Victoire = false
X = math.random(0,10)
Tentative = 0
print("Choissisez un nombre entre 0 et 10")
while Tentative < 5 and Victoire == false do
Reponse = io.read()
Reponse = tonumber(Reponse)
if Reponse == X then
print("Vous avez gagner")
Victoire = true
elseif Reponse > X then
print("Vous ete trop haut")
Tentative = Tentative + 1
elseif Reponse < X then
print("Vous ete trop bas")
Tentative = Tentative + 1
end
end
if Victoire == false then
print("Vous avez perdu")
end
io.read()