You are on page 1of 5

//ROHMATUL ADAM

//TEKNIK ELEKTRO
//4115211012
#include <iostream.h>
#include <conio.h>
void main ()
{
clrscr();
int pilihan;
char y;
do
{
cout << "\tcreated by Adam R 4115211012"<<endl;
cout<<"KONVERSI MATA UANG PER 7 MARET 2012"; cout<<endl;
cout<<"-----------------------------------------"; cout<<endl;
cout<<endl;
cout<<" PILIHAN KONVERSI : "; cout<<endl;
cout<<" 1. KONVERSI MATA UANG ASING KE INDONESIA"; cout<<endl;
cout<<" 2. KONVERSI MATA UANG INDONESIA KE ASING"; cout<<endl;
cout<<"-----------------------------------------"; cout<<endl;
cout<<" MASUKKAN PILIHAN KONVERSI : "; cin>>pilihan;
if (pilihan== 1 )
{
int pilihan1;
float q, h;
clrscr();
cout<<"KONVERSI MATA UANG . INDONESIA KE ASING (KURS JUAL)"; cout<<endl;
cout<<"---------------------------------------------------"; cout<<endl;
cout<<endl;
cout<<endl;
cout<<"
VALUTA ASING
KURS JUAL "; cout<<endl;
cout<<" ----------------------------------------------------------------------- " ; cout<<endl;
cout<<" 1. USA
(US DOLLAR)
9300,00"; cout<<endl;
cout<<" 2. CHINA (YUAN)
1427,26"; cout<<endl;
cout<<" 3. JAPAN (JAPAN YEN)
115,96"; cout<<endl;
cout<<" 4. EROPA (EROPA EURO)
12228,85"; cout<<endl;
cout<<" 5. INGGRIS (POUNSTERLING)
14662,75"; cout<<endl;
cout<<" 6. AUSTRALIA (AUSTRALIA DOLLAR)
9840,50"; cout<<endl;
cout<<" -----------------------------------------------------------------------" ; cout<<endl;
cout<<" MASUKKAN PILIHAN ANDA : "; cin>>pilihan1; cout<<endl;
switch (pilihan1)
{
case 1:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;
h=q*9300.00;
cout<<q<<" NILAI TUKAR UANG ANDA ADALAH USD "; cout<<h;
break ;
case 2:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;

h=q*1427.26;
cout<<" NILAI TUKAR UANG ANDA ADALAH YUAN "; cout<<h;
break ;
case 3:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;
h=q*115.96;
cout<<" NILAI TUKAR UANG ANDA ADALAH YEN "; cout<<h;
break ;
case 4:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;
h=q*12228.85;
cout<<" NILAI TUKAR UANG ANDA ADALAH EURO "; cout<<h;
break ;
case 5:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;
h=q*14662.75;
cout<<" NILAI TUKAR UANG ANDA ADALAH POUNDSTERLING "; cout<<h;
break ;
case 6:
cout<<"MASUKKAN JUMLAH UANG ANDA :Rp "; cin>>q;
cout<<endl;
h=q*9840.50;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
clrscr ();
default : cout<<" MAAF MENU YANG ANDA MASUKKAN SALAH"; cout<<endl;
}
}
else if (pilihan== 2)
{
int pilihan2;
float q, h;
clrscr();
cout<<"KONVERSI MATA UANG . ASING KE INDONESIA (KURS BELI) "; cout<<endl;
cout<<"--------------------------------------------------- "; cout<<endl;
cout<<endl;
cout<<endl;
cout<<"
VALUTA ASING
KURS JUAL "; cout<<endl;
cout<<" ------------------------------------------------------- " ; cout<<endl;
cout<<" 1. USA
(US DOLLAR)
9050,00"; cout<<endl;
cout<<" 2. CHINA
(YUAN)
1445,55"; cout<<endl;
cout<<" 3. JAPAN
(JAPAN YEN)
111,00"; cout<<endl;
cout<<" 4. EROPA
(EROPA EURO)
11862,00"; cout<<endl;
cout<<" 5. INGGRIS
(POUNSTERLING)
848,00"; cout<<endl;
cout<<" 6. AUSTRALIA (AUSTRALIA DOLLAR)
9539,00"; cout<<endl;
cout<<" ------------------------------------------------------- " ; cout<<endl;
cout<<" MASUKKAN PILIHAN ANDA : "; cin>>pilihan2; cout<<endl;
switch (pilihan2)
{
case 1:

cout<<"MASUKKAN JUMLAH UANG ANDA :USD "; cin>>q; cout<<endl;


h=q*9050.00;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
case 2:
cout<<"MASUKKAN JUMLAH UANG ANDA :YUAN "; cin>>q; cout<<endl;
h=q*1164.00;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
case 3:
cout<<"MASUKKAN JUMLAH UANG ANDA :YEN "; cin>>q;
cout<<endl;
h=q*111.00;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
case 4:
cout<<"MASUKKAN JUMLAH UANG ANDA :EURO "; cin>>q; cout<<endl;
h=q*11862.00;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
case 5:
cout<<"MASUKKAN JUMLAH UANG ANDA :POUNSTERLING "; cin>>q; cout<<endl;
h=q*848.00;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
case 6:
cout<<"MASUKKAN JUMLAH UANG ANDA :AUSD "; cin>>q; cout<<endl;
h=q*9539.50;
cout<<" NILAI TUKAR UANG ANDA ADALAH Rp "; cout<<h;
break ;
clrscr ();
default : cout<<" MAAF PILIHAN TIDAK TERSEDIA"; cout<<endl;
}
}
cout<<""; cout<<endl;
cout<<"ULANGI KONVERSI ? (Y/N)"; cout<<endl; cin>>y;
clrscr ();
}
while (y == 'Y');
getch();
}

You might also like