3
: - -.
, . , , .
(), .
, , , .
, . . , , (. 1).
. 1.
, , .
: READ, READLN, WRITE, WRITELN.
: SIN, COS, ORD.
, , .
. , , . , .. (. 2).
, , . , , , .. .
, (. 2) , . , , , , . , , .
. 2.
, .
|
|
, : , , , , . , , 21 , , , 2, . , , .
, . .
, (. 2) ( ).
, , . , . .
:
PROCEDURE <> [(<. . .>)];
:
FUNCTION <> [(<. . .>)]: <>;
<> ;
<. . .> ;
<> .
( ). , , :
procedure SB (a: real; b: integer; c: char);
, ,
function F (a: real; b: real): real;
:
function F (a, b: real): real;
: .
. . ()
var
x,y: real;
function power(a, b: real): real;
begin
if a>0 then power:= exp(b*ln(a))
else power:= 0;
end; {function power}
begin
repeat
readln(x,y);
writeln(power(x,y));
until false;
end.
power writeln. x y . a b , . .
, . , . .
-, -. a b -. -, var,
|
|
function power(var a: real, b: real): real;
-, , . -, , . - , , - .
, - , - .
power(x, 3*sin(x)); power(x, 3.17);
.
var
a, b: integer;
procedure inc2(var c: integer; b: integer);
begin
c:= c + c; b:= b+b;
writeln(:, c:5, b:5);
end;
begin
a:= 5; b:= 7;
writeln(:, a:5, b:5);
inc2(a,b);
writeln(: , a:5, b:5);
end.
:
: 5 7
: 10 14
: 10 7
- , , : . , , , , .
- : , .
! , - . - .
, . - , - .
1. , . x. , .
1.1.
1.2.
1.3.
1.4.
1.5.
1.6.
1.7.
1.8.
1.9.
1.10.
1.11.
1.12.
2. , i - . (i >0).
2.1. ai = 2 × ai 2 + ai 1, i = 1, 2, 3, ; a 1=1, a 2=1.
2.2. ai = (ai 2 + ai 1) / 3, i = 1, 2, 3, ; a 1=1, a 2=1.
2.3. ai = ai 2 / 5 + ai 1, i = 1, 2, 3, ; a 1=1, a 2=1.
2.4. ai = (ai 2 + ai 1) × 2, i = 1, 2, 3, ; a 1=1, a 2=1.
2.5. ai = ai 2 / 7 ai 1, i = 1, 2, 3, ; a 1=56, a 2=1.
2.6. ai = (ai 2 ai 1) × 2, i = 1, 2, 3, ; a 1=3, a 2=1.
2.7. ai = (ai 2 ai 1) / 2, i = 1, 2, 3, ; a 1=5, a 2=1.
2.8. ai = 3 × ai 2 2 × ai 1, i = 1, 2, 3, ; a 1=2, a 2=1.
2.9. ai = (2 × ai 2 + ai 1) / 3, i = 1, 2, 3, ; a 1=2, a 2=1.
2.10. ai = ai 2 / 4 + 2× ai 1, i = 1, 2, 3, ; a 1=16, a 2=1.
2.11. ai = ai1 1 + 4× ai 1, i = 1, 2, 3, ; a 1=3, a 2=5.
2.12. ai = -ai 2 /2 + ai 1, i = 1, 2, 3, ; a 1=2, a 2=4.
3. , .2, n .
|
|
4. , ( ( char)). , , .
4.1. | 4.2. | ||
4.3. | 4.4. | ||
4.5. | 4.6. | ||
4.7. | 4.8. | ||
4.9. | 4.10. | ||
4.11. | 4.12. |