Program tamgiac;
Var a,b,c:integer;
S,p:real;
Begin
Write(' Nhap 3 canh cua tam giac:');readln(a,b,c);
p:=(a+b+c)/2;
S:=sqrt(p*(p-a)*(p-b)*(p-c));
Write(' dien tich hinh tam giac la:',S);
Readln;
End.
Chúc bạn học tốt!
program dientich_tam_giac;
uses crt;
var a,b,c:integer;
p,s:real;
begin
clrscr;
write('nhap a='); readln(a);
write('nhap b='); readln(b);
write('nhap c='); readln(c);
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
writeln('dien tich tam giac la: ',s:4:2);
end
else writeln('day khong phai la 3 canh cua tam giac');
readln;
end.