так
procedure TForm1.Button1Click(Sender: TObject);
Var a:integer; y:real;
begin
a:=strtoint(edit1.Text);
if a>0
then
y:=(exp(2*ln(a))-7*a)
else
if
a=0
then
y:=(exp(2*ln(a))-exp(1/2*ln(7+4))/8)
else
if
a<0
then
y:=(exp(2*ln(sin(a)))/4);
panel1.Caption:=FloatTostr(y);
end;
или так
procedure TForm1.Button1Click(Sender: TObject);
Var a:integer; y:real;
begin
a:=strtoint(edit1.Text);
if a>0
then
y:=(exp(2*ln(a))-7*a);
if
a=0
then
y:=(exp(2*ln(a))-exp(1/2*ln(7+4))/8);
if
a<0
then
y:=(exp(2*ln(sin(a)))/4);
panel1.Caption:=FloatTostr(y);
end;
|