You are on page 1of 36

9

1 , 34

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


i ii iii i .
. .
.
1-.
, . . .
. .
. .
. .
2-. -
- . . .
. . .
. . .
. .
3-.
. . . ,
.
.
: , .
-WHILE
-REPEAT

FOR

4-.
. .

5-.
. . .
.
. .


6-.
. .

7-.
. CRT
.
.
.
8-.
. . .

.
9-.
: , ,
. .

,

:_________

: ___________

:
.
:
: , -
, , - ;
: , .
: , , .
: .
: , ,
:
1.

2.

3.

4.

1.
08.02.90 ,
,
,
,
.
. .

, ,
,
.

:
1.

2.
-
3.

4.

5.

:
1. - , ,
, , .
2. .
3.- .
4. () -
.
5.,
-

,
,

.
.
6. .
7. , , ,
.
- :
1. , -
() ,
.
2. , .
3. .
- :
1.
-
70) . - 50 .
2.
.

(60-

3.

.
4.

, .
5.
.
:
1. - ,
, .
2. , .
3. , .
4. .
.
5. ,
.
.
- :
1.
.
2.
.
3.
.

:
1. ( );
2.
;
3. ,
;
4. { , 03
).
:
1. (, );
2. ();
3. - ,
;
4. ( , 03
).
:
1.
;
2.
( , 03
).
:
1.
, ,
;
2.
( , 03
).
3.

(-) .

1-
- , .
- , .

. 4-5 .
2-
- , 3 .
- .
- .
3-
- , , .
- .
4-
- , , .
- .
5-
- , , .
-
6-
- , , .
- .
7-
- 20-30 - .
: , .
.

:_________

: ___________

: , . .
:
:
;
: - , ;
: ,
.
:
: , , .
:
1. .
2. .
3. .
4. .
5. .
6. .
:
?
( - .)
?
( - ,
.)

?
( - .)

?
( - , ,
( ) , - .)

?
( -
.
:

.
,
. ,
.
.
.
.
, .
:
, ; .
.
-
algorithmi .

,
(, ) .
:
1. .
2. .
3. .
4. .
5. .


.

.
:
1.
.
.
.
2.
,
,
. .
3.
,
. ,
, .
.
4.
.
. ,
, .
: , ,
, .
,
: , , .
,
.
,
.
,
.
:
1. ? .
2. ?
3. ?
4. ?
5. ?
6. ?
.
:
1.1, 1.2,- , .

:_________

: ___________

:
, .
:
:

;
:
- , ;
:
,
.
:

: , , , .
:
1.
2.
3.
4.
5.
6.
:
1. " ?
2. ?
3. ?
4. ?
5. ?
6. - ?
7. - ?

-
.
, , ,
. ,
, .
.
. -
. .

, .
()
.
,
:
:

();

- . .
; .
.
.
, ,
.

.

.
:= , , :=

.
1. Y=(AX-B)*(CX+D) -
.

:

A*X ; R1
R1-B ; R2
C*X ; R3
R3+D ; R4
R2*R4

, :

R1:=A* X;
R2:-R1-B;
R3:=C*X;
R4:=R3+D;
Y:=R2*R4;


, . :
, , .
( - ) , , ;
( - )
( );
( - )
;
( - ) .
-
-
. .
.
.
:





,


- :

. 1.2
:
Y=(2x+3)*(7x-5) Y .

.
Y=(5-(x-3)2)/((x-3)2+4) Y .
: 1.3- . 13,14,15 .

:_________

: ___________

: .
:
: .
: - , ;
: ,
.
:
: , , , ,
.
:
1. .
2. .
3. .
4. .
5. .
6. .
.
,
.

. , ,
.

, ,
.
,
. : ,
.

, :
() ;
;
;
;
26 .
)
, :
ABCDEFGHIJKLMNOPQRSTUVWXYZ
b c d e f g h i j k l m n o p q r s t u v w x y z
(_).
, :
, ALFA1, aLfA1 alfa1 .
,
, , VES1, SALMAK2,Baga5, cena7, T7S25 ...
(, , ...) ,
( ())
.
) : (0..9) .
A- F- ( a- f-)
.
() .
) :
+
();
*
();
();
/
();
DIV ( ), , 10 div 3
3;

MOD ( ), , 10 mod 3 1;
:
AND ( ) ;
OR ( ) ;
NOT ( ) ;
: .
: ,
: . .

:
5-6. :

:_________

: ___________

. .
:

:
.
1. :
.
2. :
3. :
.
, :
,
:
. 1.
, .

2.
?
?
?

.

.
, .
.
, . ( )
.
. , .
, ,
. ,
.
:
1. .
2. .
3. .
4. .
5. - .
1.
,
.
, ,
. ,
,
.

2. .
.
,
.
S
S1, S2
R1, R2
R1<R2 R1<0 R2<0

S1:=p*R12; S2:=p*R22; S:=S1-S2; S

3.
-
. ,
, .
QBasic, .. .
.
4.
.
, 20- 40%-
. .
5. - .
,
. , - .
, . ,
.
:
1. - ?
2. ?
3. ?
4. - ?
5. - ?
:
1.9- , .

:
7. :

:_________

: ___________

. .
:

:
,
.
1. : ,
.
2. : .
.
3. :
.
, :
, .
.
:
:
. 1.
, .

2.
?
?
?
?


, :
ABCDEFGHIJKLMNOPQRSTUVWXYZ
b c d e f g h i j k l m n o p q r s t u v w x y z
(_).
,

.
(
) ( )
.
. ,
.
. -
(;) . 256
.
, .
- PROGRAM ,

. .
, -
. .
.
-, , . begin
, ()
Program BASTAU;
, end ,
.


.
Begin
,
,

End.

.
____
.
____
.
____
.
____ 32768 + 32767
integer .
___ 10-33- 10+33- , 0
real
.
___ True False
boolean
.
____
char .
, , ,
.
,
.

,
.

. , 1 2 ,
, , .
, ,
. .

.

.
.

-INTEGER,BYTE,SHORTINT,WORD,LONGINT;
REAL,SINGLE,DOUBLE,EXTENDED,COMP;
BOOLEAN;
CHAR;
(STRING);
ASCII (PCHAR),
(TEXT),
(POINTER) .

() : ARRAI, REKORD, SET


FILE .
,
, , , . .
-
.
1. (+- , +(-)
).
2. ( x*y-d/4
, ).
3. ,
(2/* 2 ,
).
4. ((+b)*(c+b))
.
5. , : ,
, , . . .
6. .
:
:
3
*
1) bx+c
a sqr(x)*x-b*x+c
sqrt (abs(s(x)+sin(x))))
2) | In(cosx sin x) |
sgr(sin())-cos(sqr())
3) sin 2x-cosx2
2
(sgr()-(sqr()))//(sqr()+(-sgr()))
a2 e
4)
2
a 2 e
(sgr()+(sgr(b)))/ (*b*sqr (sin () )*sin (x ))
a2 b2
5)
3
ab sin x
Exp ( y*ln( x ) )
6) x yinx
Exp ( 1/3*ln ( x+y ))
7) e 3 x y

: .
: ,
: .

:
8. :

:_________

: ___________

. . .
:

:
.
1. : ,
.
2. : , ,
.
3. :
.
, :
,
:
:
. 1.
, .

2.
?
?


.
. ,
- , -
.
- ,
, , .. .
,
.
, ,
, .
() ,
.
,
, .

-
.
- -
.

() .
.
- ,
begin end .
, 7 . :
1) ( uses
);
2) (label) ;

3) (const) ;
4) (type) ;
5) (var) ;
6) (procedure) ;
7) (function) ;

Begin

end

;


.
Program < > (Iput, Output);
Uses <1-, 2-, 3- , .>;
Label ;
Const.;
Type..;
Var
;
Procedure < >
< >

Function < >


< >
Begin
< 1- >;
< 2- >;
...
;
< n- >
End
, .
: .
: ,
: .

:
:_________
: ___________
9.
: , , .
:
: ;
: - , ;
: ,
.
: .
: , , .
:
1.
2.
3.
4.
5.

:
1. .
2. ( ),
.
= := .
, . , =5 - 5- ,
:=+3 . :=5 5
. :=+3 ,

:=

3
. 3.4-
.
: :=+1;
:=5.35;
1:=(-b + SQR T (b*b-4*a*c)) \ (2 *a )
a[2,3] : = m n ;
fun : = false ; {fan boolean }
c:=2 * pi* r ;
R: = 19.36 ;
M : = ;
Y : = sqrt (sqr ( x ) + 1 ) ;
Y1 : = 3.5 + sin ( ) ;
:

: =
.
CASE-OF IF
. .
.
: Case <> Of
< >:< 1>;
< 2>:< 2>; ...
< N>:< N>

Else <>
End.
.
,
. -
, lse .
,
.
.
: .
: , .
: .
:

1.
2.
3.
4.
5.


?


-

. .

:
10. :

:_________

: ___________

: . .
:

: .

1. : .
2. :
. , , .
3. :
.
, :
, .
.
:
:
. 1.
, .

2.
? ?
?
?

() .
.
.: , ,
()
.
: , (), ,
() .
.
. (
) .
,
. .
,
. ( ) : <
>:=<>; < >- , :=-
, ;<> .
:
1. .
2. ( ),
.
= := .
, . , =5 - 5- ,
:=+3 . :=5 5
. :=+3 ,


:=

3
. 3.4-
.
: :=+1;
:=5.35;
1:=(-b + SQR T (b*b-4*a*c)) \ (2 *a )
a[2,3] : = m n ;
fun : = false ; {fan boolean }
c:=2 * pi* r ;
R: = 19.36 ;
M : = ;
Y : = sqrt (sqr ( x ) + 1 ) ;
Y1 : = 3.5 + sin ( ) ;
:

: =
.
CASE-OF IF
. .
.
: Case <> Of
< >:< 1>;
< 2>:< 2>; ...
< N>:< N>
Else <>
End.
.
,
. - ,
lse .
,
. .
.
:
Case N Of
1..10: Writeln (N:4, 1-10 );
11..20: Writeln (N:4, 11-20 );
21..30: Writeln (N:4, 21-30 );
Else Writeln ( N:4, );
End;
:
se N Of
1:Z:=N+10; 2: Z:=N+100; 3:Z:=N+1000;
End.
:
Var season:(winter. Spring. Summer. Autumn);
egin
....
Case season Of
Winter:Writeln (winter );
spring: Writeln (spring );

End
:
.
Program M6;
Var n.m: integer;
Begin
Readln (n.m ):
Case n of
1.3.5.7.8.10.12: writeln (31 ):
4,6,9,11: writeln (30 );
2:if (m mod 4=0) and not (( m mod 100=0 )and ( 400<>0 ))
Then writeln (29 ) else writeln (28 )
End;
End.
m ___ , n ____ 5 4 .
: .
: , .
: .
:

:
11. :

:_________

: ___________

: .

:
: ,
, .
1. :
, .
2. :

3. :
.
, :
, .
.
:
:
. 1.
, .

2.
?
?
?

. ()

.
.
:
While. repeat ,

. ,
.

While
.

:While <> do< >:


.
, ,
. , ,

.
While-Do .
: a.b (>1) . 1, 2, 3,... b
.
Program M7
Var a.b.c.real.
Begin
c<b
Read (a.b.),
Writeln ( ),
c.= a
c
While c<b do
Begin
Writeln (:6:1);
c:=c*a
;= c*a; write ( , );
End;
nd.
,2,3,...
,- b- ,
. >=b , .
begin.end .

, -
,(i-1) i-1/(i-1) /i- , .
.
- .
.
Program M8:
Var x.eps.i.y.s.real.
Abs(y)>e
Begin read ),eps);
S:= 0. Y.=1.I.=0.
While abs () >=eps do
Begin
s : s+y
.
i:i+i
s.=s+y.i.=i+1.
y: = +x/
y.=y*x/i.
End.
Write (s,6,2,): End.
: .
: , .
:
:

:
12. :

:_________

: ___________

: .

:
: ,

1. : .
2. : .
3. :
.
, :
, .
.
:
:
. 1.
, .

2.
?
?
?


.
1: .
program esep1;
var x, y, z: integer;
begin
write( );
read(x, y);
z:=x+y;
write( =, z);
end.
2: x, y, z
.
program esep2;
var x, y, z, P: integer;
begin
write( );
read(x, y, z);
P:=x*y*z;
write(x, * , y, * , z, * , P);
end.
: .
: , .
: 49 11, 1 .
.
(Repeat), (Until) .
: Repeat< > Until< >;
15

. Repeat Until; While do


.
1. Repeat

, , , .
2. Repeat ,
While , , ;
3. Repeat. Until ,
While .
: 0 10-

Repeat :

Program M9
Var i.sun.integer.
Begin
I;=0: sum .=0:
Repeat
Sum.=sum+1.
i.=i+2
Until (i>10):
Writeln
(2+4+8+10=.sum
End.

Sum: = sum + i
i: i + 2

I > 10

i>10 , . Repeat Until


16 .
Goto .
. Repeat s.=100/a. d.=a/5. if
S<0.5 then Goto metka;
:=+1
Until (<=100) and (d<>0): metka:...
: n .
While Repeat , .
10- , , ...
.
For-Do .
.
:
1. For< >:=< > downto< >do < >.
2. For < >:= < > downto < >do< >.
.
- .
, .
.
.
: .
: , .
:
.

:
13. :

:_________

: ___________

: .

:
:

1. :

2. :
.
3. :

, :
, .
.
:
:
. 1.
, .

2.
For-Do ?
?
?

. ,
. ,
.

.
. .
while. repeat.for ,
:
.
.
for ,2- 9-
.
Program kobejtu kestesi 1.
Var i. j ; byte;
Begin
For i: = 2 to 9 do
Begin
For j: = 1 to 10 do
Writeln
End
End.
1-
N = 1.2.3 = 2.4.6.8 Y = 2K + N
.
PROGRAM FUNKCIA 1;
VAR N.K.Y: INTEGER;
BEGIN
WRITELN (N K Y ) ;
WRITELN (
);

FOR N : = 1=TO 3 DO
BEGIN
K: = 2
WHILE K< = 8 do
BEGIN
Y : = 2* K+N
WRITELN (:3, N:4, :3, K:4, :3, Y: 4 );
K:= K+2
END
END.
.
:
1.Uses, label, type, const, var ,
.
2. begin end ,
, .
3. ,
, .
4. while, repeat, do until
.
5. then else , .
: 1202 . :
( ) ( , - ),
. , ?
: 1, 1, 2, 3, 5, 8,
13, 21, 34, ... N
.
: .
: , .
:
.

:_________

: ___________

14-15.
: .
:
: ;
: - , ;
: ,
.
: .
: , , .
:
1.
2.
3.
4.
5.
:
1. ? (3: , ,
)
2. Div Mod ? (Div , Mod )
3. Var ? ( )
4. Const ? ( )
5. Read ? ( )
6. Write ? ( )
. , .
: , , .
: (
)

.

<>
<1->
<2->

IF <> THEN <1-> ELSE <2->

if <> then begin


{ , }
end
else begin
{ , }
end;
:
else-
(else ) ( )
, begin end

: .
:
:
: : .

:_________

: ___________

16.
: .
:
: ;
: - , ;
: ,
.
: .
: , , .
:
1.
2.
3.
4.
5.


: . -
,. ?
: (<2000000) , .
: ,
.

: .
: n = 0 , "n <> 0" .


while <> do begin
{ }
end;
:
:
while (a<b) and (b<c) do begin
{ }
end;
, begin end
:
while a < b do
a := a + 1;
:

, -
a := 4; b := 6;
while a > b do
a := a b;
,
(
a := 4; b := 6;
while a < b do
d := a + b;


: (<2000000), .
: ?
: , (!).
: . =>
. ( ).
.
:

:

until ("")

1: 0,001 :
:
S = 1.157
2: 0,001 :
:
S = 1.220
: .
: , .
:
: : .

:_________

: ___________

17.
: .
:
: ;
: - , ;
: ,
.
: .
: , , .
:
1.
2.
3.
4.
5.
1. - :
)

) -
) -
)
)
2. :
) , ,
) , ,
) , ,
) , ,
) , ,
3. - :
)
)

)
)
4. - :
)
)

)
)
5. - :
)
)

)
)
6. - :
)
)


)
)
7. :
)
)

)
)
8. :
) For Next

) If Then Else

) Read Data

) If -Next

9. :
) For Next

) If Then Else

) Read Data

) If -Next

10. :
) For Next

) If Then Else

) Read Data

) If -Next

11. :
)

10

11

: .
: , .
:
: : .

You might also like