![]() |
|
#1
|
|||
|
|||
![]() Помогите пожалуйста.
Есть 2 radiobutton'a как сделать, чтобы при нажатии 2го результат выходил в (edit1) в градусах (sin,cos,tg), а 1го обратно в радианы? кнопка = Код:
procedure TForm1.BitBtn18Click(Sender: TObject); begin if edit1.Text<>'' then b:=strtofloat (edit1.Text); case c of 'x':edit1.Text:=floattostr(power(a,b)); '+':edit1.Text:=floattostr(a+b); '-':edit1.Text:=floattostr(a-b); '*':edit1.Text:=floattostr(a*b); '/':begin if b<>0 then edit1.Text:=floattostr(a/b) else form3.Show; end; end; end; Код:
procedure TForm1.BitBtn24Click(Sender: TObject); begin x:=strtofloat(edit1.Text); y:=sin(x);//sin,cos,sin(x)/cos(x). edit1.Text:=floattostr(y); end; Последний раз редактировалось OmG killer, 08.04.2013 в 13:01. |