pascalabcnet/InstallerSamples/!Tutorial/01_First/Boolean1.pas
2025-10-14 21:21:47 +03:00

13 lines
395 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Логический тип. Логические выражения с and, or и not
begin
var x: integer := ReadInteger('Введите x (от 1 до 9):');
var b: boolean := x=5;
Println('x=5?',b);
b := (x>=3) and (x<=5);
Println('x=3,4 или 5?',b);
b := (x=3) or (x=4) or (x=5);
Println('x=3,4 или 5?',b);
b := not Odd(x);
Println('x - четное?',b);
end.