Показать сообщение отдельно
  #1  
Старый 08.04.2013, 12:54
OmG killer OmG killer вне форума
Прохожий
 
Регистрация: 13.03.2013
Сообщения: 23
Репутация: 10
По умолчанию Pадианы, градусы

Помогите пожалуйста.
Есть 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;
кнопки sin,cos,tg
Код:
procedure TForm1.BitBtn24Click(Sender: TObject);
begin
x:=strtofloat(edit1.Text);
y:=sin(x);//sin,cos,sin(x)/cos(x).
edit1.Text:=floattostr(y);
end;
Ответить с цитированием