Const x0=1; xk=4; dx=0.3; y0=0.5; yk=1.5; dy=0.2; var x,y,z: real; i,j:integer; begin writeln(' x y z'); x:=x0-dx; for i:=0 to round((xk-x0)/dx) do begin x:=x+dx; y:=y0-dy; for j:=0 to round((yk-y0)/dy) do begin y:=y+dy; z:=cos(x*y-1)+2; writeln(x:4:1,' ',y:4:1,' ',z:6:4); end; end; end.
Answers & Comments
Verified answer
Const x0=1; xk=4; dx=0.3; y0=0.5; yk=1.5; dy=0.2;var x,y,z: real; i,j:integer;
begin
writeln(' x y z');
x:=x0-dx;
for i:=0 to round((xk-x0)/dx) do
begin
x:=x+dx;
y:=y0-dy;
for j:=0 to round((yk-y0)/dy) do
begin
y:=y+dy;
z:=cos(x*y-1)+2;
writeln(x:4:1,' ',y:4:1,' ',z:6:4);
end;
end;
end.
Результат:
x y z
1.0 0.5 2.8776
1.0 0.7 2.9553
1.0 0.9 2.9950
1.0 1.1 2.9950
1.0 1.3 2.9553
1.0 1.5 2.8776
1.3 0.5 2.9394
...
3.7 1.5 1.8383
4.0 0.5 2.5403
4.0 0.7 1.7728
4.0 0.9 1.1431
4.0 1.1 1.0332
4.0 1.3 1.5097
4.0 1.5 2.2837