() if , while repeatuntil.
:
1. a > 2*b
2. sin(sqr(a)) <= exp(cos(b))2.3
3. (a <= 3) and (b > a/2)
(<, >, <=, >=, =, <>)
and ( ),
or ( ),
not ( ),
xor ( ).
true () false (). , , .
Pascal. IF. .
if :
If <> then <1> else <2>;
if, then, else (, , );
<> ;
<1> <2> ( ).
: if sin()>b then y:= a
else y:= b;
if :
<> (true () false ()).
<> true (), <1>, <2> .
<> false (), <2>, <1> .
if
if < > then < >;
: if a< 2*b then y: = a/2;
if a< 2*b then begin
y: =2 * a;
writeln(y)
end;
B 1 y:=a/2; .
2 begin y:=2*a; writeln(y) end; .
, begin end:
begin <>;
end;
, , .
if .
<>.
true, <>.
false, <> , .
25 Pascal. CASEOF. .
Case
if , case .
:
case <-> of
<1>: <1>;
<2>: <2>;
|
|
...
<N>: <N>
else <>
end;
<-> , , , ( byte, integer, boolean char);
<1, 2,... N> , -. , (), .
else case .
case .
-.
, -.
- , , else, else, , case.