Objectifs
- A quoi sert la boucle while ?
- La syntaxe
- Les erreurs à éviter
Syntaxe
Exemple: Boucle while en mode for
Les erreurs à éviter
- Oublie des accolades {}
Click to rate this post!
[Total: 0 Average: 0]
while cond
{
instruction 1;
instruction 2;
...
}
int cond=1;
int i=0;
while cond % 0, 1, ..., 10
{
instruction 1;
instruction 2;
...
i=i+1;
if i==10
cond=0;
}
while cond
instruction1; % Incluse dans la boucle
instruction2; % Non incluse dans la boucle
...; % Non incluse dans la boucle
You have successfully subscribed to the newsletter
There was an error while trying to send your request. Please try again.