,
: | - . |
:
, p/2 2p p/12. .
{ }
program prac9;
var x,y:real;
function f(x:real):real;
begin
f:=sin(x)-1;
end;
begin
writeln(' x y');
writeln('------------------------');
x:=pi/2;
repeat
y:=f(x);
writeln(x:6:2,y:15:6);
x:=x+pi/12;
until x>2*pi;
writeln('------------------------');
readln;
end.
.
1.
1.
p/2 2p p/12. .
Program Func_1_1;
Const
pi=3.14;
Var
y,x:real;
Function f(x:real):real;
Begin
f:= sin(x)/x;
end;
Begin
x:= pi/2;
Whilex < 2 * pi do
Begin
y:=f(x);
writeln('x = ', (x * 180)/pi:3:2, ' y=',y:3:2);
x:=x+pi/12;
end;
end.
x = 90.00 y=0.64
x = 105.00 y=0.53
x = 120.00 y=0.41
x = 135.00 y=0.30
2. , .
Program Proc_1_2;
Const
pi=3.14;
Var
r,P,V:real;
Procedure ObS(r:real; var m,n:real);
Begin
m:= 4/3 *pi * sqr(r);
n:= 4/3 * pi *power(r,3);
end;
Begin
write(' r = ');
read (r);
Obs(r, p, v);
writeln('p = ',p:3:2, ' v =', v:3:2);
end. r = 5
p = 104.67 v =523.33
2.
1.
p/2 2p p/12. .
Program Func_2_1;
Const
pi=3.14;
Var
y,x:real;
Function f(x:real):real;
Begin
f:= x * cos(x);
end;
Begin
x:= pi/2;
while x <= 2 * pi do
Begin
y:=f(x);
writeln('x = ', (x * 180)/pi:3:2, ' y=',y:3:2);
x:=x+pi/12;
end;
end.
x = 90.00 y=0.00
x = 105.00 y=-0.47
x = 120.00 y=-1.04
x = 135.00 y=-1.66
x = 150.00 y=-2.26
2. , (V = abc, P = 2(ab + bc + ac)).
Program Proc_2_2;
Var
a,b,c,v,p:real;
Procedure ObPl(x,y,z:real; var o,s:real);
Begin
o:= 2*(x*y + y* z + x* z);
s:= x*y*z;
end;
Begin
writeln(' a,b,c');
read (a,b,c);
ObPl(a,b,c,p,v);
writeln(' p = ',p:3:2, ' v =', v:3:2);
end.
a,b,c
2.1
3.3
6.4
p = 82.98 v =44.35
3.
1.
-1 3 0,5. .
|
|
2. , (V = a3 , P = 6a2 ).
a = 4
= 96.00 v =64.00
4.
1.
-15 20 5. .
:
x=-15 y=0.81
x=-10 y=0.71
x= -5 y=0.46
x= 0 y=2.00
x= 5 y=1.62
x= 10 y=1.31
x= 15 y=1.20
2. , (V = pR2 h, S = 2pRh).
:
r = 5
h = 10
s = 314.00 v =785.00
5.
1.
-p p p/12. .
:
x=-3.14 y=0.00
x=-2.88 y=-0.29
x=-2.62 y=-0.57
..
2. ,
6.
1.
y = sin x + sin 2x + sin 3x
-2p 2p p/8. .
2. , , .
7.
1.
1 5 0,5. .
2.
(1 = 16 = 0,454 ).
8.
1.
y = x2 2x + 3
-3 3 0,5. .
2. .
9.
1.
y = x3 0.8x + 2
-2 4 0,5. .
2. m1 m2 , v1,
10.
1.
y = (x + 1)2 2(x +5)
-3 3 0,5. .
2. .
:
:
1. .
2. .
3. .
4. .
:
1. ?
2. ?
3. ?
4. - ?
5. ?
6. ?
7. ?
8. -?
9. ?
|
|
10.
.
: | . |
, TYPE.
type __ [ ] of _;
:
type mas [1..10] of integer;
, mas, 10, . input, :
procedure input(a:mas);
:
input(B);
, .
:
D, , , . : , D 1 2 . .
:
program massiv;
uses crt;
const n=3;
m=3;
type mas=array[1..n,1..m] of real;
var C,D:mas;
i,j:integer;
S,buf,min:real;
{ }
procedure vvod(var a:mas);
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to m do
begin
write(i,',',j,'->');
readln(a[i,j]);
end;
end;
{ }
procedure vivod(a:mas);
var i,j:integer;
begin
for i:=1 to n do
begin
for j:=1 to m do
write(a[i,j]:10:2);
writeln;
end;
end;
{ k- l- }
procedure perest(var a:mas;k,l:integer);
var buf:real;
i,j:integer;
begin
for j:=1 to m do
begin
buf:=a[k,j];
a[k,j]:=a[l,j];
a[l,j]:=buf;
end;
end;
{ }
function min_mas(a:mas):real;
var min:real;
i,j:integer;
begin
min:=a[1,1];
for i:=1 to n do
for j:=1 to m do
if a[i,j]<min then min:=a[i,j];
min_mas:=min;
end;
{ }
function sum_mas(a:mas):real;
var S:real;
i,j:integer;
begin
S:=0;
for i:=1 to n do
for j:=1 to m do
S:=S+a[i,j];
sum_mas:=S;
end;
begin
clrscr;
writeln(' :');
vvod(C);
writeln;
writeln(' D:');
vvod(D);
clrscr;
writeln(' :');
vivod(C);
perest(C,n,n-1);
writeln(' :');
vivod(C);
S:=sum_mas(C);
min:=min_mas(C);
writeln(' ->',S:5:2);
writeln(' ->',min:5:2);
writeln
writeln(' D:');
vivod(D);
perest(D,1,2);
writeln(' D :');
vivod(D);
S:=sum_mas(D);
min:=min_mas(D);
writeln(' D->',S:5:2);
writeln(' D->',min:5:2);
readln;
end.
1.
: , , , , , . .
2.
: , , , , , . .
3.
: , , , , , . .
|
|
4.
: , , , , , . .
5.
: , , , , , . .
6.
: , , , , , . .
7.
: , , , , , . .
8.
: , , , 10 , , . .
9.
: , , , 5 , , . .
10.
: , , , , , . .
11.
: , , , , , . .
12.
: , , , , , . .
13.
: , , , 1 , , . .
14.
: , , , , , . .
|
|
15.
: , , , , , , . .
16.
: , , , 10 , , . .
:
:
1. .
2. .
3. .
4. .
:
1. ?
2. , ?
3. , ?
4. ?