Const a=-1; b=2; h=0.3;
var x,s:real;
i,n:integer;
begin
x:=a-h;
n:=round((b-a)/h)+1;
for i:=1 to n do
begin
x:=x+h;
s:=sin(1/x)/cos(1/x)+2*cos(x/2);
writeln(x:5:1,' ',s:6:3);
end;
end.
Результат:
-1.0 0.198
-0.7 -5.105
-0.4 2.707
-0.1 1.349
0.2 -1.391
0.5 -0.247
0.8 4.852
1.1 2.989
1.4 2.397
1.7 1.987
2.0 1.627