Информатика. Программирование в Delphi
186
2:x:=pi/4;
3:x:=pi/3;
4:x:=pi/2;
5:x:=pi;
6:x:=3*pi/2;
7:x:=2*pi
else
x:=StrToFloat(ComboBox1.Text);
end;
case ComboBox2.ItemIndex of
0:y:=0;
1:y:=pi/6;
2:y:=pi/4;
3:y:=pi/3;
4:y:=pi/2;
5:y:=pi;
6:y:=3*pi/2;
7:y:=2*pi
else
y:=StrToFloat(ComboBox2.Text);
end;
if (RadioButton1.Checked) and (ComboBox1.ItemIndex=-1) and
(ComboBox3.ItemIndex in [0,1,2,3]) then
x:=x*gr;
case ComboBox3.ItemIndex of
0:z:=sin(x);
1:z:=cos(x);
2:z:=sin(x)/cos(x);
3:z:=cos(x)/sin(x);
4:z:=exp(y*ln(x));
5:z:=x+y;
6:z:=x-y;
7:z:=x*y;
8:z:=x/y
else
z:=0;
end;
Label3.Caption:=ComboBox3.Text+'='+FloatToStrF(z,ffFixed,15,7);
end;
end.