PROJECT KONVERSI MATA UANG DELPHI 7
Posted in DELPHI 7
....KONVERSI MATA UANG......
COMBOBOX1=INPUT, COMBOX2=OUT
procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x := strtofloat(Edit1.Text);
if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/9000);
if (combobox1.Text='RUPIAH') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*9000);
if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/6619);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*6619);
if (combobox1.Text='RUPIAH') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/13650);
if (combobox1.Text='EURO') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*13650);
if (combobox1.Text='RUPIAH') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/17076);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*17076);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/0.6994);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*0.6994);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1.4422);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.4422);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.8041);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.8041);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/2.5792);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.5792);
if (combobox1.Text='EURO') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.251);
if (combobox1.Text='EURO') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x*1.251);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;
end.
COMBOBOX1=INPUT, COMBOX2=OUT
procedure TForm1.Button1Click(Sender: TObject);
var x:real;
begin
x := strtofloat(Edit1.Text);
if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/9000);
if (combobox1.Text='RUPIAH') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*9000);
if (combobox1.Text='RUPIAH') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/6619);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*6619);
if (combobox1.Text='RUPIAH') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/13650);
if (combobox1.Text='EURO') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*13650);
if (combobox1.Text='RUPIAH') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/17076);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='RUPIAH')
then edit2.Text:= floattostr(x*17076);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/0.6994);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*0.6994);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1.4422);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.4422);
if (combobox1.Text='DOLLAR (US)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.8041);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (US)')
then edit2.Text:= floattostr(x*1.8041);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='EURO') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.0618);
if (combobox1.Text='DOLLAR (SINGAPURA)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/2.5792);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='DOLLAR (SINGAPURA)')
then edit2.Text:= floattostr(x*2.5792);
if (combobox1.Text='EURO') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1.251);
if (combobox1.Text='EURO') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x/1);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='EURO')
then edit2.Text:= floattostr(x*1.251);
if (combobox1.Text='POUND (INGGRIS)') and (combobox2.Text='POUND (INGGRIS)')
then edit2.Text:= floattostr(x/1);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;
end.
0 comments: