Labels

Rabu, 05 Oktober 2011

PROGRAM KONVERSI MATA UANG

Program Konversi_Mata_Uang;
Uses WinCrt;

var r,u,e: real;
ul :char;
a :integer;

procedure Rupiah_USDollar;
begin
  Writeln('Program Konversi Indonesia Rupiah Ke US Dollar');
  Writeln('==============================================');
  Writeln;
  Write('Input Mata Uang dalam Indonesia Rupiah: ');readln(r);
  u:=r/9075.15;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang US Dollar Adalah: ','US$ ',u:4:2);
end;

procedure Rupiah_Euro;
begin
  Writeln('Program Konversi Indonesia Rupiah Ke Euro');
  Writeln('=========================================');
  Writeln;
  Write('Input Mata Uang Dalam Indonesia Rupiah: ');readln(r);
  e:=r/11830.86;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang Euro Adalah: ','euro ',e:4:2);
end;

procedure USDollar_Rupiah;
begin
  writeln('Program Konversi US Dollar ke Indonesia Rupiah');
  Writeln('==============================================');
  Writeln;
  Write('Input Mata Uang Dalam US Dollar: ');readln(u);
  r:=u*9075.15;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang Indonesia Rupiah Adalah: ','Rp ',r:4:2);
end;

procedure USDollar_Euro;
begin
  writeln('Program Konversi US Dollar ke Euro');
  writeln('==================================');
  writeln;
  write('Input Mata Uang Dalam US Dollar: ');readln(u);
  e:=u*0.77;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang Euro adalah: ','euro ',e:4:2);
  end;

procedure Euro_Rupiah;
begin
  writeln(' Program Konversi Euro ke Indonesia Rupiah');
  writeln('==========================================');
  writeln;
  write('Input Mata Uang Dalam Euro: ');readln(e);
  r:=e*11830.86;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang Indonesia Rupiah Adalah: ','Rp ',r:4:2);
end;                                             

procedure Euro_USDollar;                                                     
begin
  writeln('Program Konversi Euro ke US Dollar');
  writeln('==================================');
  writeln;
  write('Input Mata Uang Dalam Euro: ');readln(e);
  u:=e*1.3;
  Writeln;
  Writeln('Jadi Konversi Dalam Mata Uang US Dollar Adalah: ','US$ ',u:4:2);
end;

begin
repeat
clrscr;
writeln;
writeln('*-----------SELAMAT DATANG---------------*');
writeln;                  
writeln ('  1. Rupiah    - US Dollar');
writeln ('  2. Rupiah    - Euro');
writeln ('  3. US Dollar - Rupiah');
writeln ('  4. US Dollar - Euro');
writeln ('  5. Euro      - Rupiah');
writeln ('  6. Euro      - US Dollar');
writeln;
write ('Silahkan Pilih Konversi Yang Anda Inginkan : '); read (a);
writeln;
case a of
1 : Rupiah_USDollar;
2 : Rupiah_Euro;
3 : USDollar_Rupiah;
4 : USDollar_Euro;
5 : Euro_Rupiah;
6 : Euro_USDollar;

else
writeln ('Maaf, pilihan yang Anda masukan salah !!');
end;
Writeln;
Write('Mau Coba Lagi [Y/T]: ');Readln(ul);
Until ul in ['T','t'];

writeln;
writeln ('* Terima Kasih, Silahkan Datang Lagi *');

End.


-SCREENSHOOT-




0 comment:

Posting Komentar

Followers