[Précédent]
[Index] | [Enoncé] | [Version imprimable]
[Prochain]

3.6
  Tables de multiplications - Corrigé
Niveau 1
 
 
Fichiers:
  Tables.java    

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class Tables {

    public static void main(String[] args) {
        System.out.println("     Tables de multiplication");
        for (int i = 2; i <= 10; ++i) {
            // \n est un saut de ligne 
            System.out.println("\n Table de " + i + " :"); 
            for (int j=0; j <= 10; ++j) { 
                System.out.println("    " + i + " * " + j + " = " + i*j); 
            }
        }
    }
}

 


[Précédent]
[Index] | [Enoncé] | [Version imprimable]
[Prochain]