Const dN=-2; dK=1; Hd=0.5; tN=-1; tK=-3; Ht=-1; var d,t,z:real; i,j,n1,n2:integer; begin n1:=round((dK-dN)/Hd); n2:=round((tK-tN)/Ht); d:=dN-Hd; writeln(' d t z'); for i:=0 to n1 do begin d:=d+Hd; t:=tN-Ht; for j:=0 to n2 do begin t:=t+Ht; z:=sqrt(abs(d*d*d-2))+3*t; writeln(d:4:1,' ',t:4:1,' ',z:6:3); end; end; end.
Answers & Comments
Verified answer
Const dN=-2; dK=1; Hd=0.5; tN=-1; tK=-3; Ht=-1;var d,t,z:real; i,j,n1,n2:integer;
begin
n1:=round((dK-dN)/Hd);
n2:=round((tK-tN)/Ht);
d:=dN-Hd;
writeln(' d t z');
for i:=0 to n1 do
begin
d:=d+Hd;
t:=tN-Ht;
for j:=0 to n2 do
begin
t:=t+Ht;
z:=sqrt(abs(d*d*d-2))+3*t;
writeln(d:4:1,' ',t:4:1,' ',z:6:3);
end;
end;
end.
Результат:
d t z
-2.0 -1.0 0.162
-2.0 -2.0 -2.838
-2.0 -3.0 -5.838
-1.5 -1.0 -0.682
-1.5 -2.0 -3.682
-1.5 -3.0 -6.682
-1.0 -1.0 -1.268
-1.0 -2.0 -4.268
-1.0 -3.0 -7.268
-0.5 -1.0 -1.542
-0.5 -2.0 -4.542
-0.5 -3.0 -7.542
0.0 -1.0 -1.586
0.0 -2.0 -4.586
0.0 -3.0 -7.586
0.5 -1.0 -1.631
0.5 -2.0 -4.631
0.5 -3.0 -7.631
1.0 -1.0 -2.000
1.0 -2.0 -5.000
1.0 -3.0 -8.000