Nombre aléatoire

Fermé
prof_inf - 9 nov. 2014 à 22:49
BloodyAngel Messages postés 1479 Date d'inscription mardi 21 juin 2005 Statut Contributeur Dernière intervention 21 juin 2018 - 10 nov. 2014 à 01:28
prière de me donner la formule permettant d'afficher un nombre x appartenant à l'intervalle [a,b[
Merci pour la coopération

1 réponse

BloodyAngel Messages postés 1479 Date d'inscription mardi 21 juin 2005 Statut Contributeur Dernière intervention 21 juin 2018 401
10 nov. 2014 à 01:28
Hello,

Var resultat: Longint;
Randomize;
resultat:=Random(b-a)+a;


J'ai pas testé mais à priori ça marche.
0