Escolar Documentos
Profissional Documentos
Cultura Documentos
/////////////////////////////////////////////////////////////////////
Baixe aqui o código que o professor usou na aula. Ou se preferir, abaixo você pode copiá-lo:
{
/// OPERADORES DE LÓGICOS ///
+-------------+-----------+-------------+-------------+
| CONDIÇÃO 1 | OPERADOR | CONDIÇÃO 2 | RESULTADO |
+-------------+-----------+-------------+-------------+
| Verdadeiro | E | Verdadeiro | Verdadeiro |
+-------------+-----------+-------------+-------------+
| Verdadeiro | E | Falso | Falso |
+-------------+-----------+-------------+-------------+
| Falso | E | Verdadeiro | Falso |
+-------------+-----------+-------------+-------------+
| Falso | E | Falso | Falso |
+-------------+-----------+-------------+-------------+
+-------------+-----------+-------------+-------------+
| CONDIÇÃO 1 | OPERADOR | CONDIÇÃO 2 | RESULTADO |
+-------------+-----------+-------------+-------------+
| Verdadeiro | OU | Verdadeiro | Verdadeiro |
+-------------+-----------+-------------+-------------+
| Verdadeiro | OU | Falso | Verdadeiro |
+-------------+-----------+-------------+-------------+
| Falso | OU | Verdadeiro | Verdadeiro |
+-------------+-----------+-------------+-------------+
| Falso | OU | Falso | Falso |
+-------------+-----------+-------------+-------------+
///////////////////////////////////////////////////////////
+-------------+-----------+-------------+-------------+
| CONDIÇÃO 1 | OPERADOR | CONDIÇÃO 2 | RESULTADO |
+-------------+-----------+-------------+-------------+
| True | AND | True | True |
+-------------+-----------+-------------+-------------+
| True | AND | False | False |
+-------------+-----------+-------------+-------------+
| False | AND | True | False |
+-------------+-----------+-------------+-------------+
| False | AND | False | False |
+-------------+-----------+-------------+-------------+
+-------------+-----------+-------------+-------------+
| CONDIÇÃO 1 | OPERADOR | CONDIÇÃO 2 | RESULTADO |
+-------------+-----------+-------------+-------------+
| True | OR | True | True |
+-------------+-----------+-------------+-------------+
| True | OR | False | True |
+-------------+-----------+-------------+-------------+
| False | OR | True | True |
+-------------+-----------+-------------+-------------+
| False | OR | False | False |
+-------------+-----------+-------------+-------------+
}
begin end;
Baixe aqui o código que o professor usou na aula. Ou se preferir, abaixo você pode copiá-lo:
var
numX : float;
numX2 : inteiro;
//POTÊNCIA
begin
numX := Power(10,2);
ConsoleLog(numX,clBranco);
end;
{
//RAÍZ QUADRADA
begin
numX := Sqrt(9);
ConsoleLog(numX,clBranco);
end;
}
{
//ARREDONDAMENTO
begin
numX := Round(10.51);
ConsoleLog(numX,clBranco);
end;
}
{
//ARREDONDAMENTO PARA CIMA
begin
numX := Ceiling(10.9);
ConsoleLog(numX,clBranco);
end;
}
{
//ARREDONDAMENTO PARA BAIXO
begin
numX2 := round(10.1);
numX2 := Floor(10.01);
ConsoleLog(numX2,clBranco);
end;
}
begin end;