#include<conio.h>
#include<iostream.h>
main()
{
char kode,game[17],nama[10];
int lama,harga,jumsewa,tobar,ubar,ukem;
clrscr();
cout<<"\tRENTAL VIDEO GAME"<<endl;
cout<<"================================================"<<endl;
cout<<"Kode \tVideo Game \t Harga Sewa"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"1\tPlay Station 3\tRp 20.000,-"<<endl;
cout<<"2\tX-Box\t\tRp 23.0000,-"<<endl;
cout<<"3\tNitendo Wii\tRp 25.0000,-"<<endl;
cout<<"-----------------------------------------"<<endl;
cout<<"Masukkan Nama Pelanggan:";cin>>nama;
cout<<"Masukkan Kode Video Game:";cin>>kode;
cout<<"Masukkan Jumlah Sewa\t:";cin>>lama;
cout<<"==================================================="<<endl;
if(kode=='1')
{strcpy(game,"Play Station 3"); harga=20000;}
else if (kode=='2')
{strcpy(game,"X-Box"); harga=23000;}
else
{strcpy(game,"Nitendo Wii"); harga=25000;}
cout<<endl;
clrscr();
cout<<"===================================================="<<endl;
cout<<"Pelanggan\t:"<<nama<<endl;
cout<<"--------------------------------------------------"<<endl;
cout<<"Kode Video Game\t\t:"<<kode<<endl;
cout<<"Nama Video Game\t\t:"<<game<<endl;
cout<<"Biaya Sewa/jam\t\t:"<<harga<<endl;
cout<<"Jumlah Sewa(jam)\t\t:"<<lama<<endl;
cout<<"\t\t--------------------"<<endl;
tobar=lama*harga*jumsewa;
cout<<"Total Bayar \t\t:Rp"<<tobar<<endl;
cout<<"Uang Bayar \t\t:Rp";cin>>ubar;
ukem=ubar-tobar;
cout<<"Uang Kembali\t\t:Rp"<<ukem<<endl;
cout<<"================================================"<<endl;
cout<<"\n\TERIMA KASIH Atas Kunjungannya"<<endl;
cout<<"================================================"<<endl;
getch();
}

0 comments:
Post a Comment