.


:




:

































 

 

 

 


Turbo-Pascal. .




, , , .

begin
1;
........
N
end

, . .
, , . ( end) . , , (, ). if, , .
:

, , end, until else if.

: < >:=< >;

, , . . .

, , , . . , , , ' .

() :

1) ; 2) (*), (/), div), (mod); 3) (+), (-).

. .

 

 

. , , x z, z = max (x, y), z: = x, z: = y. x y , , . . ​​ , .

​​ x> y. x y ( true), z: = x; z: = y ( x = y , , z: = y ).

. :

if B then S1 else S2
if (), then () else () , - , S1 S2 - .

S1 S2: ( true), S1, S2.

z = max (x, y) .

 

 

.

- . , - . 䳺, .

:

case <- > of
< 1>:< 1>;
................................
< N>: < N>;
else <>
end;

case . < - >, , . , , else. else , , end, case. ( 32768.. 32767), , . . , . "..". - .

.

case I of
1: Z:=I+10;
2: Z:=I+100;
3: Z:=I+1000
end;

 

 





:


: 2016-04-03; !; : 639 |


:

:

, , .
==> ...

1902 - | 1569 -


© 2015-2024 lektsii.org - -

: 0.008 .