1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
public void stocke_stations(int a, int b, int c){
// ICI a,b,c correspondent aux coordonnées x, y et c le rayon
ma_matrice = new int[10][3];
for(i =0; i < ma_matrice.length; i++){
for(j =0; j < ma_matrice.length; j++){
if(ma_matrice[0][0] == 0 && ma_matrice[0][1] == 0 && ma_matrice[0][2] == 0){
ma_matrice[i][j] = a;
ma_matrice[i][j+1] = b;
ma_matrice[i][j+2] = c;
}
}
}
System.out.println("X_St1 : " +ma_matrice[0][0]);
System.out.println("Y_St1 : " +ma_matrice[0][1]);
System.out.println("R_St1 : " +ma_matrice[0][2]);
System.out.println("X_St2 : " +ma_matrice[1][0]);
System.out.println("Y_St2 : " +ma_matrice[1][1]);
System.out.println("R_St2 : " +ma_matrice[1][2]);
} |
Partager