unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls;
type
TForm1 =
class
(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
CheckBox1: TCheckBox;
Edit1: TEdit;
Edit2: TEdit;
SpeedButton1: TSpeedButton;
procedure
SpeedButton1Click(Sender: TObject);
private
public
end
;
var
Form1: TForm1;
a,b,x,y :
real
;
implementation
{$R *.dfm}
procedure
TForm1
.
SpeedButton1Click(Sender: TObject);
begin
a:=StrToFloat(form1
.
Edit1
.
Text);
b:=a-x;
begin
;
if
Form1
.
RadioButton2
.
Checked
then
x:=
60
;
y:=
10
;
if
Form1
.
RadioButton1
.
Checked
then
x:=
55
;
y:=
5
;
end
;
if
CheckBox1
.
Checked
then
b:=a-x+y;
Edit2
.
Text:=FloatTostr(b);
end
;
end
.