Răspuns :
program arie;
var a,b,c:integer;
s,p:real;
function
laturi_ok:boolean;
begin
laturi_ok:= (a>0) and (b>0) and
(c>0) and (a+b>c) and (a+c>b)
and (b+c>a) ;
end;
BEGIN
write('introduceti
laturile');readln(a,b,c);
P:=(a+b+c)/2;
IF laturi_ok then
begin
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('s=',s:5:2);
writeln('p=',p*2:5:2);
end
else
writeln('laturi negative sau prea mari');
readln;
END.
// solutia in
limbajul C
#include <stdio.h>
#include <math.h>
float a,b,c;
float s,p;
int laturi_ok(void)
void main(void)
else
printf("laturi negative sau prea mari");
}