Объяснение:
var
a,b,c: word;
w,h: word;
r: word;
P,S: real;
begin
readln(a,b,c);
P := (a + b + c) / 2;
S := sqrt(P * (P - a) * (P - b) * (P - c));
writeln('P=',a+b+c,'; S=',S:5:2);
readln(w,h);
writeln('P=',(w+h)*2,'; S=',w*h);
readln(r);
P := 2 * pi * r;
S := pi * r * r;
writeln('P=',P:5:2,'; S=',S:5:2);
end.
5 3 5
P=13; S= 7.15
3 9
P=24; S=27
5
P=31.42; S=78.54
Объяснение:
var
a,b,c: word;
w,h: word;
r: word;
P,S: real;
begin
readln(a,b,c);
P := (a + b + c) / 2;
S := sqrt(P * (P - a) * (P - b) * (P - c));
writeln('P=',a+b+c,'; S=',S:5:2);
readln(w,h);
writeln('P=',(w+h)*2,'; S=',w*h);
readln(r);
P := 2 * pi * r;
S := pi * r * r;
writeln('P=',P:5:2,'; S=',S:5:2);
end.
5 3 5
P=13; S= 7.15
3 9
P=24; S=27
5
P=31.42; S=78.54