Nico creation methodes vides #7

Merged
NyxiumYuuki merged 33 commits from Nico_Creation_Methodes_vides into main 2021-02-01 18:45:25 +01:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 5c79e3f681 - Show all commits

View file

@ -107,14 +107,15 @@ public class Choix {
}
public void afficherCombinaisons2(int chiffre1){
int j=0, k=0, l=0;
int j=0, k=0, l=0, cpt=0;
for(int i=1;i<50;i++) {
if (i != chiffre1) {
while (numId[chiffre1][j] != 0) {
while (numId[i][k] != 0) {
System.out.println(numId[i][k] +"=="+ numId[chiffre1][j]);
if (numId[i][k] == numId[chiffre1][j]) {
combi1Cpt[i]++;
combi1Id[i][0]=numId[i][k];
combi1Id[i][cpt++]=numId[i][k];
}
k++;
}
@ -123,9 +124,13 @@ public class Choix {
}
j = 0;
}
cpt=0;
}
for (int i=1; i<50;i++) {
System.out.println(i+":"+combi1Cpt[i]);
/*for (int p=1; p<50;p++) {
System.out.print(combi1Id[i][p]+", ");
}*/
System.out.println(i+": "+combi1Cpt[i]);
while(combi1Id[i][l]!=0){
System.out.print(combi1Id[i][l]+", ");
l++;

View file

@ -20,5 +20,6 @@ public class test{
Choix c=new Choix();
c.afficherChiffre1();
//c.afficherNumBonus();
c.afficherCombinaisons2(4);
}
}