1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| public class Afficher
{
public static void main(String [] arg)
{
String Bienvenu= "Bienvenue a lecole ";
String Nom = "Maheux";
String Prenom = "Marie-Josee";
String debutant = "DEBUTANT";
String moyen = "MOYEN";
String avance = "AVANCE";
byte choix ;
System.out.println (Bienvenu);
System.out.println(Nom + Prenom);
System.out.println("1: = " + debutant) ;
System.out.println("2: = " + moyen) ;
System.out.println("3: = " + avance) ;
do //Début de la boucle permettant de faire un choix
{
System.out.print("Faites un Choix :");
choix=Lire.b() ;
switch (choix)
{
case 1 : //choix 1
System.out.println("1: =" + debutant) ;
break ;
case 2 : //choix 2
System.out.println("2: =" + moyen) ;
break ;
case 3 : //choix 3
System.out.println("3: =" + avance) ;
break;
default : //Si le choix n' est pas correct(ex:choix=5)
System.out.println("Veuillez entrer un choix correct");
} //fin de la fonction
}
while (choix!= 4) ; //fin de la boucle
} //fin du main()
} |