-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif.html
More file actions
27 lines (24 loc) · 1 KB
/
if.html
File metadata and controls
27 lines (24 loc) · 1 KB
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>if_javascript</title>
<script>
var nota = 75; // se_nota_>=_60_-_Aprovado
var res; // variavel_criada_para_facilitar_a_logica se_nota_>=_40 && < 60_-_Recuperacao
//se_<_40_-_Reprovado
if( nota >= 60) {
res= "Aprovado..."; // "aprovado"_atribuido_a_variavel_"res"
} else if((nota >= 40) && (nota < 60)) {
res = "Recuperacao...";
} else {
res= "Reprovado..."; // "Reprovado"_atribuido_a_variavel_"res"
}
document.write(res); // imprimindo_a_variavel_"res"_resultante
</script>
</head>
<body>
</body>
</html>