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 08:59] – [Imbrication] montay.l | bloc1:prog:conditionnelles [2024/11/19 09:12] (Version actuelle) – [Forme riche (Selon-cas)] montay.l | ||
|---|---|---|---|
| Ligne 48: | Ligne 48: | ||
| La <color # | La <color # | ||
| - | <code=python> | + | <code=java> |
| - | jour = " | + | String choix; |
| - | ---- | + | if(choix |
| - | if jour == " | + | |
| - | | + | } else if(choix |
| - | elif jour == " | + | |
| - | | + | } else if(choix |
| - | elif jour == " | + | |
| - | | + | } else { |
| - | else: | + | |
| - | | + | } |
| </ | </ | ||
| + | |||
| + | < | ||
| + | switch(choix){ | ||
| + | case 1: | ||
| + | | ||
| + | | ||
| + | case 2: | ||
| + | | ||
| + | | ||
| + | case 3: | ||
| + | | ||
| + | | ||
| + | default: | ||
| + | | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| ===== Imbrication ===== | ===== Imbrication ===== | ||
| - | L'< | + | L'< |
| < | < | ||
| if (score > 50) { | if (score > 50) { | ||
| - | System.out.println(" | + | System.out.println(" |
| | | ||
| - | | + | |
| - | System.out.println(" | + | System.out.println(" |
| - | } else { | + | } else { |
| - | System.out.println(" | + | System.out.println(" |
| } else { | } else { | ||
| - | System.out.println(" | + | System.out.println(" |
| } | } | ||
| </ | </ | ||
bloc1/prog/conditionnelles.1732003181.txt.gz · Dernière modification : 2024/11/19 08:59 de montay.l
