: .
: . :
if <> then <1> else <2>;
. (True), < 1>, (False)- <2 >. :
if <> then <>;
, (False), if .
. : = (), <> ( ), > (), < (), >= ( ), <=( ). (and), (or), (no t). True False . and True, , False. or False, , True. not True False .
2. A B :
if a < b then min: = a else min: = b;
3. , X [ a, b] [ c, d]:
(x >= a) and (x<=b) or (x >= c) and (x<=d)
. <1 > <2> if, . else if. then else , begin.. end. begin < > end .
4. [ a, b]. , : [ a, b], [ a, b] [ a, b]:
if (x >= a) and (x<=b) then write( )
else if x > b then write( x )
else write( x );
5. ( 1) : , , , , .
, . . , . . Var , :
|
|
Var eps: real48 = 0.1; //
( Example_1) :
//
if (abs(a12+a23-a31)<eps)or
(abs(a12+a31-a23)<eps)or
(abs(a23+a31-a12)<eps) then
writeln(' ')
Else
begin
if (abs(a12-a23)<eps)and(abs(a12-a31)<eps) then
writeln(' ')
else
begin
if ((abs(a12*a12+a23*a23-a31*a31)<eps) or
(abs(a12*a12+a31*a31-a23*a23)<eps) or
(abs(a23*a23+a31*a31-a12*a12)<eps)) then
begin
writeln(' ');
if (abs(a12-a23)<eps)or
(abs(a12-a31)<eps)or
(abs(a31-a23)<eps) then
writeln(' ');
end
else if (a12=a31)or(a12=a23)or(a31=a23) then
writeln(' ')
else writeln(' ');
end;
end;
( 5) (.2):
.2. ( 5)
( ), :
Case <> of
m1: begin < > end;
m2: begin < > end;
.......
mn: begin < > end
else < >
end;
:
- ( );
- m1, m2, mn - ( ), label .
: , lse- ( ). lse- , .
6. , num.
Var num: integer;
Begin
write (' = ');
Readln (num);
Case num of
0,2,4,6,8: writeln (' ');
1,3,5,7,9: writeln (' ');
10..100: writeln (' 10 100')
Else
writeln (' 100')
End; ?????
1. . .
2. . .
3. : , , . : , , , . .
4. . : , , , .
|
|
5. y = k* x + b r . ? , , .
6. , , .
(a, b), (c, d). , ? , ?
7. , . : , , . , , .
8. a, b, c, d. , .
9. . - , , , , .
10. . , ?
11. a* b c* d k* p? .
12. . , .
13. . . .
14. , , . .
15. ? .
16. . , . , .
17. . , OY.
18. . , .
19. , : (x1, y1 ), (x2, y2 ), (x3, y3). , , .
20. . . , .
21. . , .
22. . , ? , , .
23. , . . , , ?
24. , , .
(a, b). (c, d)? , , ?
25. , , ?
|
|