Delphi?代码?
procedure TForm1.Button1Click(Sender: TObject);var
a,b,c,s,area:Single;
begin
a:=strtofloat(edit1.Text);
b:=strtofloat(edit2.Text);
c:=strtofloat(edit3.Text);
s:=(a+b+c)/2;
if(s>0)And(s-a>0)And(s-b>0)And(s-c>0) Then
begin
area:=sqrt(s*(s-a)*(s-b)*(s-c));
Label1.Caption:='能构成三角形的三边,该三角形的面积为:'+floattostr(area);
end
Else
Label1.Caption:='不能构成三角形的三边。';
end;
麻烦给看下这段代码是那里有错误就是不能运行(这是一个计算三角形面积的代码)
追问:可是就是运行不了?不知道是那里有问题