uses crt;
var a,b,c:real;
dt:real;
{---------------------------chuong-trinh-con-nhap-----------------------------}
procedure nhap(var x,y,z:real);
begin
repeat
write('Nhap a=');readln(x);
write('Nhap b='); readln(y);
write('Nhap c='); readln(z);
until (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a);
end;
{-----------------chuong-trinh-con-tinh-dien-tich------------------------}
function dientich(var f,g,h:real):real;
var p:real;
begin
p:=(f+g+h)/2;
dientich:=sqrt(p*(p-f)*(p-g)*(p-h));
end;
{--------------------------chuong-trinh-chinh--------------------------}
begin
clrscr;
nhap(a,b,c);
dt:=dientich(a,b,c);
writeln('Dien tich tam giac la: ',dt:4:2);
readln;
end.