Professional Documents
Culture Documents
( A)
( )
4 2013
:
: (6)
1.
,
,
,
,
.
. case
.
. Pascal
.
. pred(x)
.
. for i:=10 downto 11 do
.
. (Boolean) ,
(True) (False).
10
1 6
2.
1.
2.
3.
4.
5.
1,2,3,4,5
, ,
, , , ,
.
. Procedure
. div
. while
. mod
. COBOL
. if
10
A3.
x,y,
readln(x,y);
x:=x+10;
y:=x+10;
writeln(x,y);
:
. x=0 y=0
. x=20 y=10
4
4.
(identifiers)
Pascal ;
. Program_2
. Program2
. 2oProgram
. Last_Program
4
2 6
A5.
P Q:
P
True
True
False
False
Q
True
False
True
False
P and Q
P or Q
8
B
Pascal:
Program themab;
Var
k, m: integer;
Begin
k:=32;
m:=10;
while k>=8 do
begin
k:=k div 2;
m:=m+k;
writeln(k,m)
end
End.
B1.
k, m,
.
1
2
3
k
32
m
10
12
3 6
2.
.
8
.
, ,
,
, :
1 100
101
80
60
,
, 30 .
Pascal,
:
1. .
2
2.
,
. ,
( ,
).
2
3.
, .
6
4. ,
.
6
5.
.
4
4 6
:
.
.
,
.
100,
80 ,
100,
60 .
100 .
5.000 .
, ,
20 200.
, , :
1. .
2
2.
.
4
3.
.
3
4.
. ,
.
5
5. ,
,
, .
6
5 6
:
.
.
,
() Pascal,
.
, 5.
1. (,
).
.
2.
.
.
.
3. .
4.
.
5. .
6. : (3)
.
7. : 10.00 ..
6 6