uses crt;
var a,b,c,dt,p,cv:real;
begin
clrscr;
repeat
write('Nhap canh thu nhat:'); readln(a);
write('Nhap canh thu hai:'); readln(b);
write('Nhap canh thu ba:'); readln(c);
until (a>0) and (b>0) and (c>0);
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
cv:=a+b+c;
writeln('Chu vi tam giac la: ',cv:4:2);
p:=cv/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('Dien tich tam giac la: ',dt:4:2);
end
else writeln('Day khong la ba canh trong mot tam giac');
readln;
end.