Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class test {
- public int [][] Tableau = new int[6][6];
- public void remplirTableau(){
- var testIndex =0;
- Scanner sc = new Scanner(System.in);
- var test = new String[]{"Gagné", "Nul","Perdu","Marqués","Encaissés","O"};
- for(var i=0; i<Tableau.length;i++){
- System.out.println("\n");
- for (var j=0; j<Tableau.length;j++){
- System.out.print(String.format("Equipe n° [%d]\n",i));
- System.out.println(test[j]);
- Tableau[i][j] = sc.nextInt();
- // System.out.print(Tableau[i][j] +" ");
- }
- }
- }
- public void afficheTableau(){
- for(var i=0; i<Tableau.length;i++){
- System.out.println("\n ---------------------");
- for (var j=0; j<Tableau.length;j++){
- System.out.print(Tableau[i][j] +" ");
- }
- }
- }
- public void mettreAJourTableau(){
- for(var i=0; i<Tableau.length;i++){
- System.out.println("\n ---------------------");
- // Tableau[i][5] = Tableau[i][0] * 3;
- // Tableau[i][1] = Tableau[i][1] *1;
- int resultat = (Tableau[i][0]*3) + (Tableau[i][1]*1);
- Tableau[i][5] = resultat;
- }
- }
- public static void main(String[] args) {
- test test = new test();
- test.remplirTableau();
- test.mettreAJourTableau();
- test.afficheTableau();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement