var
ax, ay, bx, by, cx, cy, S, P: real;
begin
read(ax, ay, bx, by, cx, cy);
S := 0.5 * abs((ax - cx) * (by - cy) - (bx - cx) * (ay - cy));
P := sqrt(sqr(bx - ax) + sqr(by - ay));
P := P + sqrt(sqr(cx - bx) + sqr(cy - by));
P := P + sqrt(sqr(ax - cx) + sqr(ay - cy));
write('Периметр ', P, ' площадь ', S)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
ax, ay, bx, by, cx, cy, S, P: real;
begin
read(ax, ay, bx, by, cx, cy);
S := 0.5 * abs((ax - cx) * (by - cy) - (bx - cx) * (ay - cy));
P := sqrt(sqr(bx - ax) + sqr(by - ay));
P := P + sqrt(sqr(cx - bx) + sqr(cy - by));
P := P + sqrt(sqr(ax - cx) + sqr(ay - cy));
write('Периметр ', P, ' площадь ', S)
end.