static void Main(string[] args) { do { Random rnd = new Random(unchecked((int)DateTime.Now.Ticks)); int[,] tab_nombres = new int[10,7]; int[,] tab_gains = new int[10,7]; int[] tab_combine_gagnante = new int[7]; int[] tab_doublons = new int[50]; int nbr_tirage=0; saisir_nbr_tirage(ref nbr_tirage); initialiser_table(tab_nombres,nbr_tirage,tab_doublons,ref rnd); generer_combine_gagnante(tab_combine_gagnante,tab_doublons,ref rnd); generer_Tab_gains(tab_combine_gagnante,tab_gains,tab_nombres); afficher_table(tab_nombres,tab_gains,nbr_tirage,tab_combine_gagnante); }while(recommencer() == 'O'); } public static void initialiser_table(int[,] tab_nombres,int nbr_tirage,int[] tab_doublons,ref Random rnd) { int colonne,ligne,nbr_rnd; colonne=ligne=0; for(colonne = 0;colonne < nbr_tirage ;colonne++) { for(ligne = 0;ligne < tab_nombres.GetLength(1);ligne++) { nbr_rnd=rnd.Next(49)+1; tab_nombres[colonne,ligne]=nbr_rnd; if(verifier_doublons(tab_doublons,nbr_rnd)==true) { ligne--; continue; } } Effacer_Tabdoublons(tab_doublons); }