ALGOBOX : PROG_LANCERS_DES PRÉSENTATION DE L'ALGORITHME : PROGRAMME : simulation de lancers d'un dé à 6 faces. On gagne quand on obtient un 6. CODE DE L'ALGORITHME : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 VARIABLES A EST_DU_TYPE NOMBRE B EST_DU_TYPE NOMBRE I EST_DU_TYPE NOMBRE DEBUT_ALGORITHME POUR I ALLANT_DE 1 A 10 DEBUT_POUR B PREND_LA_VALEUR 1 A PREND_LA_VALEUR floor(6*random())+1 TANT_QUE (A!=6) FAIRE DEBUT_TANT_QUE AFFICHER "C'est perdu !" A PREND_LA_VALEUR floor(6*random())+1 B PREND_LA_VALEUR B+1 FIN_TANT_QUE AFFICHER "C'est gagné en " AFFICHER B FIN_POUR FIN_ALGORITHME RÉSULTATS : ***Algorithme lancé*** C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 4 C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 7 C'est perdu ! C'est gagné en 2 C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 15 C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 11 C'est perdu ! C'est perdu ! C'est gagné en 3 C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 12 C'est gagné en 1 C'est perdu ! C'est gagné en 2 C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est perdu ! C'est gagné en 6 ***Algorithme terminé*** Généré par AlgoBox