1.
var a,b,c,p,s:real;
begin
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('s=',s:5:2);
end.
Пример:
a=3
b=4
c=5
s= 6.00
2.
var a,b,h,s:real;
begin
write('a='); readln(a);
write('b='); readln(b);
write('h='); readln(h);
s:=(a+b)*h/2;
writeln('s=',s:5:2);
end.
Пример:
a=5
b=3
h=2
s= 8.00