forked from gustavodepaula-daw/E01-HTML
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial_c.html
More file actions
39 lines (35 loc) · 966 Bytes
/
Copy pathtutorial_c.html
File metadata and controls
39 lines (35 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<h1>Tutorial Sobre Estruturas de Repetição</h1>
</head>
<div>
<h2>Loop While</h2>
<p>O loop while mantém uma repetição enquanto uma condição for verdadeira.</p>
<p>Sua estrutura é:</p>
<b>while( condição ){ código }</b>
</div>
<div>
<h2>Loop For</h2>
<p>Já o loop for mantém um loop n vezes, apartir do valor de uma variavel.</p>
<p>Sua estrutura é:</p>
<b>for( variavel = valor; variavel < n; variavel++ ){ código }</b>
</div>
<div>
<h2>Exemplos</h2>
<h3>While</h3>
<code>
int inteiro = 0;
while(inteiro < 100){
printf("%d", inteiro);
inteiro++;
}
</code>
<h3>For</h3>
<code>
for(int i = 0 ; i < 100; i++){
printf("%d", i);
}
</code>
</div>
</html>