randperm a comme argument un entier n. randperm renvoie une permutation aléatoire de [0..n−1]. On tape :
On obtient :