structure de controle Flashcards

1
Q

Structures de contrôle

A
  • Alternative
  • Itérative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Alternative

A
  • Simple
  • Complexe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Itérative

A
  • Test en entrée
  • Test en sortie
  • Nombre d’occurrences connu
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Alternative simple

A

if (condition Vrai)
{
instruction(s)…
}
else {
instruction(s)…
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Alternative complexe

A

switch(variable) {
case valeur1 instruction(s)…
break;
case valeur2 : instruction(s)…
break;
case valeur3 : instruction(s)… break;
default : ANOMALIE
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Itérative test en entrée

A

while(condition Vrai) {

instruction(s)…

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Itérative test en sortie

A

do {

instruction(s)…

} while(condition Vrai)

Attention : l’itérative «répéter jusqu’à» n’existe pas en Java => «répéter tant que»

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Itérative nombre d’occurrences connu

A

for(int i=0 ; i<5 ; i++) {
instruction(s)…
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly