#include
#include

void main()
{
int masukkan,pill,kembali;
float lit,total,bayar,jumlah;
cout<<“=================================================”<<endl;
cout<<” | SELAMAT DATANG DI SPBU PENTING ISI |”<<endl;
cout<<” =================================================”<<endl;
cout<<“1. Bensin \n”;
cout<<“2. Pertamax \n”;
cout<<“3. Solar \n”;
cout<<masukkan;

if (masukkan==1)
{
clrscr();
cout<<“Harga Bensin perliter Rp.4500,-“<<endl;
cout<<endl<>lit;
total=4500*lit;
cout<<“Total Beli : Rp.”<<total<<endl;
cout<>bayar;
kembali=bayar-total;
cout<<“Uang Kembali : Rp.”<<kembali<<endl;
}
else if (masukkan==2)
{
clrscr();
cout<<“Harga Pertamax perliter Rp.6800,-“<<endl;
cout<<endl<>lit;
total=6800*lit;
cout<<“Total Bayar : Rp.”<<total<<endl;
cout<>bayar;
kembali=bayar-total;
cout<<“Uang Kembali : Rp.”<<kembali<<endl;
}
else if (masukkan==3)
{
clrscr();
cout<<“Harga Solar perliter Rp.4000,-“<<endl;
cout<<endl<>lit;
total=4000*lit;
cout<<“Total Beli : Rp.”<<total<<endl;
cout<>bayar;
kembali=bayar-total;
cout<<“Uang Kembali : Rp.”<<kembali<<endl;
}
int srtsrb,lmprb,dwplrb,splhrb,lmarb,duarb,srb,lmarts,duarts,srts,sisa;
srtsrb=kembali/100000;
sisa=kembali %100000;
lmprb=sisa/50000;
sisa=sisa %50000;
dwplrb=sisa/20000;
sisa=sisa %20000;
splhrb=sisa/10000;
sisa=sisa %10000;
lmarb=sisa/5000;
sisa=sisa %5000;
duarb=sisa/2000;
sisa=sisa %2000;
srb=sisa/1000;
sisa=sisa %1000;
lmarts=sisa/500;
sisa=sisa %500;
duarts=sisa/200;
sisa=sisa %200;
srts=sisa/100;

cout<<srtsrb<<” lembar 100000an “<<endl;
cout<<lmprb<<” lembar 50000an “<<endl;
cout<<dwplrb<<” lembar 20000an “<<endl;
cout<<splhrb<<” lembar 10000an “<<endl;
cout<<lmarb<<” lembar 5000an “<<endl;
cout<<duarb<<” lembar 2000an “<<endl;
cout<<srb<<” lembar 1000an “<<endl;
cout<<lmarts<<” koin 500an “<<endl;
cout<<duarts<<” koin 200an “<<endl;
cout<<srts<<” koin 100an “<<endl;
getch();
}