bloc1:prog:conditionnelles
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| bloc1:prog:conditionnelles [2024/11/19 09:05] – [Imbrication] montay.l | bloc1:prog:conditionnelles [2024/11/19 09:12] (Version actuelle) – [Forme riche (Selon-cas)] montay.l | ||
|---|---|---|---|
| Ligne 49: | Ligne 49: | ||
| < | < | ||
| - | String | + | String |
| - | if (jour.equals(" | + | if(choix == 1){ |
| - | System.out.println(" | + | System.out.println(" |
| - | } else if (jour.equals(" | + | } else if(choix == 2){ |
| - | System.out.println(" | + | System.out.println(" |
| - | } else if (jour.equals(" | + | } else if(choix == 3){ |
| - | System.out.println(" | + | System.out.println(" |
| - | } else { | + | } else { |
| - | System.out.println(" | + | System.out.println(" |
| - | } | + | |
| } | } | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | switch(choix){ | ||
| + | case 1: | ||
| + | | ||
| + | | ||
| + | case 2: | ||
| + | | ||
| + | | ||
| + | case 3: | ||
| + | | ||
| + | | ||
| + | default: | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| Ligne 71: | Ligne 89: | ||
| | | ||
| if (score >= 80) { | if (score >= 80) { | ||
| - | System.out.println(" | + | |
| } else { | } else { | ||
| System.out.println(" | System.out.println(" | ||
| } else { | } else { | ||
| - | | + | System.out.println(" |
| } | } | ||
| </ | </ | ||
bloc1/prog/conditionnelles.1732003545.txt.gz · Dernière modification : 2024/11/19 09:05 de montay.l
