
18.06.2010, 17:45
|
Прохожий
|
|
Регистрация: 15.06.2010
Сообщения: 6
Репутация: 10
|
|
подскажите в чем ошибка:
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
s,a,h,x,y,b:extended;
begin
y:=strtofloat(edit1.Text);
x:=strtofloat(edit2.Text);
if y=a then
x:=a;
s:=sqrt(3)/4*a*a;
h:=sqrt(a-(a/2));
if y=s then
x:=s;
a:=sqrt(3)/4/s/s;
h:=sqrt(a-(a/2));
if y=h then
x:=s;
a:=sqrt(3)/4/s/s;
s:=sqrt(3)/4*a*a;
memo1.Lines.add('h='+floattostrf(h,fffixed,8,3)+' a='+floattostrf(a,fffixed,8,3)+' s='+floattostrf(s,fffixed,8,3));
end;
Admin: Пользуемся тегами!
|