uses crt;
var a,b,c,p:real;
{---------------chuong-trinh-con-tinh-chu-vi-------------------------}
fucntion cv(x,y,z:real):real;
begin
cv:=x+y+z;
end;
{---------------------chuong-trinh-chinh-----------------------}
begin
clrscr;
repeat
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
until (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a);
writeln('Chu vi la: ',cv:4:2);
p:=cv/2;
writeln('Dien tich la: ',sqrt(p*(p-a)*(p-b)*(p-c)):4:2);
readln;
end.
uses crt;
var a,b,c:integer;
p:real;
begin
clrscr;
write('nhap a:');readln(a);
write('nhap b:');readln(b);
write('nhap c:');readln(c);
clrscr;
p:=(a+b+c)/2;
writeln('Chu vi hinh tam giac la: ',a+b+c);
write('Dien tich hinh tam giac la: ,sqrt(p*(p-a)*(p-b)*(p-c)):0:2);
readln;
end.