var
Form1: TForm1;
a,b,c:real;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
case radiogroup1.ItemIndex of
0:begin
a:=3500;
end;
1:begin
a:=4000;
end;
2:begin
a:=5000;
end;
end;
edit1.Text:=floattostr(a+b+c);
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
b:=2000;
edit1.Text:=floattostr(a+b+c);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
x,y,z:real;
begin
x:=strtofloat(edit1.text);
y:=strtofloat(edit2.Text);
z:=y-x;
edit3.text:=floattostr(z);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
checkbox1.Checked:=false;
a:=0;
b:=0;
c:=0;
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
radiogroup1.ItemIndex:=-1;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
case combobox1.ItemIndex of
0:begin
c:=1000;
end;
end;
edit1.text:=floattostr(a+b+c);
end;
end.
Hasil Run
0 komentar:
Posting Komentar