79 lines
3.2 KiB
ObjectPascal
79 lines
3.2 KiB
ObjectPascal
Uses crt; {?????? ????????? ? ?????????????? ???????}
|
|
|
|
type
|
|
|
|
RecPoint = record {???????? ???? ????? ??????}
|
|
|
|
x, y, z: real;
|
|
|
|
comment: string
|
|
|
|
end; {?????????? ???????? ???? ??????}
|
|
|
|
var
|
|
|
|
Point: array [1..10] of RecPoint; {????????????? ?????????? ????? ???? ?????? ??? ???????? ??????????}
|
|
|
|
i: integer;
|
|
|
|
delta: real;
|
|
|
|
begin
|
|
|
|
Clrscr;
|
|
|
|
{?????????? ????????? x, y, z ????? ? ????????? ??????????? ? ???? ??????, ? ????? ?????? ??????????? ??? ?????????? ??????? z - x > 100}
|
|
|
|
for i := 1 to 10 do
|
|
|
|
begin
|
|
|
|
Point[i].x := 2*i - 3;
|
|
|
|
Point[i].y := 3*Point[i].x + 2;
|
|
|
|
Point[i].z := 6*Point[i].y - 2*Point[i].x + 1;
|
|
|
|
delta := Point[i].z - Point[i].x;
|
|
|
|
if delta > 100 then Point[i].comment := 'z - x > 100.'
|
|
|
|
else Point[i].comment := '??? ????????????.';
|
|
|
|
end;
|
|
|
|
{????? ???????? ?????}
|
|
|
|
Writeln ('???????? ??????? (???? ??????):');
|
|
|
|
Write (' ':7,'x');
|
|
|
|
Write (' ':8,'y');
|
|
|
|
Write (' ':8,'z');
|
|
|
|
Writeln (' ???????????');
|
|
|
|
|
|
|
|
{????? ??????????? ??????? - ????? ???????? ????? ??????}
|
|
|
|
for i := 1 to 10 do
|
|
|
|
begin
|
|
|
|
Write (Point[i].x:8:3,' ');
|
|
|
|
Write (Point[i].y:8:3,' ');
|
|
|
|
Write (Point[i].z:8:3,' ':2);
|
|
|
|
Writeln (Point[i].comment);
|
|
|
|
end;
|
|
|
|
|
|
|
|
Readkey;
|
|
|
|
end. |