|
|
|
|
J'ai un probleme pour afficher une matrice de 10 sur 10
a l"ecran n'affiche que 9 sur 9
aidez moi please
public void afficherMatrice()
{
for(int indice1=0;indice1<matriceDistance.length-1;indice1++)
{
for(int indice2=0;indice2<this.matriceDistance.length-1;indice2++)
{
if(indice1 == indice2)
{
this.matriceDistance[indice1][indice2] = -1;
}
System.out.print("\t"+this.matriceDistance[indice1][indice2]+" ");
}
System.out.println();
}
Configuration: Windows XP Opera 9.00
Il faut des <= non des < ou enlever le -1
|