Владу

 1
 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
const h=0.09;
var
x: real;
i: byte;
function fact(n: byte): integer;
var i: byte;
begin
fact:=1; i:=1;
while (i<=n) do
begin
fact:=fact*i;
i:=i+1;
end;
end;
function tailor(x: real; n:byte): real;
var i: byte;
begin
tailor:=0;
for i:=1 to n do
tailor:=tailor+cos(i*x)/fact(i);
tailor:=tailor+1;
end;
BEGIN
x:=0.1;
for i:=1 to 10 do
begin
writeln(x:8:2, cos(sin(x))*exp(cos(x)*ln(2.7)):10:2, tailor(x, i):10:2,
cos(sin(x))*exp(cos(x)*ln(2.7))-tailor(x, i):10:2);
x:=x+h;
end;
END.