Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Language/Structure/Control Structure/doWhile.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ A `condição` é uma expressão booleana que é avaliada como verdadeiro ou fal

[source,arduino]
----
// Inicialize x e i com um valor de 0
int x = 0;
int i = 0;
do {
delay(50); // espera os sensores estabilizarem
x = readSensors(); // checa os sensores
} while (x < 100);
i++; // soma 1 a i
} while (i < 100); // repita 100 vezes
----


Expand Down