{ Fonction d'affichage d'un tableau de reels } { tab : Le tableau à afficher } action affichage(-> reel [] tab) entier i pour i de 0 à longueur(tab)-1 faire afficherln(tab[i]) fait fin action { Fonction d'initialisation d'un tableau } { de réels avec des nombres tirés au sort } { dans l'intervalle [0.0,max[ réel } { max : La borne supérieure de l'intervalle } { tab : Le tableau à initialiser } action initialisationRand(reel [] tab ->, -> reel max) entier i pour i de 0 à longueur(tab)-1 faire tab[i] <- random()*max fait fin action { Fonction de génération et retour } { d'un tableau de réels avec des nombres } { tirés au sort dans l'intervalle [0.0,max[ } { réel } { n : La taille du tableau à générer } { max : La borne supérieure de l'intervalle } reel [] fonction generationRand(-> entier n, -> reel max) reel [n] tab initialisationRand(tab,max) retourner tab fin fonction