RadioGroup1
begin
case radiogroup1.ItemIndex of
0:begin
f:=1000;
end;
1:begin
f:=2000;
end;
2:begin
f:=3000;
end;
end;
edit1.Text:=floattostr(d+e+f);
end;
Combobox1
begin
case combobox1.ItemIndex of
0:begin
d:=1000;
end;
1:begin
d:=2000;
end;
2:begin
d:=3000;
end;
end;
edit1.Text:=floattostr(d+e+f);
end;
Combobox2
begin
case combobox2.ItemIndex of
0:begin
e:=1000;
end;
1:begin
e:=2000;
end;
2:begin
e:=3000;
end;
end;
edit1.Text:=floattostr(d+e+f);
end;
Button Mulai Baru
begin
combobox1.Text:='';
combobox2.Text:='';
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
end;
Button Hitung
var
a,b,c:real;
begin
a:=strtofloat(edit1.Text);
b:=strtofloat(edit2.Text);
c:=b-a;
if b<a then
showmessage('uang anda kurang');
edit3.Text:=floattostr(c);
end;
Button Exit
begin
form1.Close;
end;
0 komentar:
Posting Komentar