#include <stdio.h>
#include <conio.h>
#include <iostream.h>
main()
{
char nama[20];
int lama,nomor;
long int harga,jumbay,total, pot;
cout<<" Bandung Prima Hotel"<<endl;
cout<<"====================================="<<endl;
cout<<"Masukkan Nama Penyewa:";cin>>nama;
cout<<"Masukkan Nomor Kamar[101/102/201/202/301/302:";cin>>nomor;
cout<<"Masukkan Lama Inap :";cin>>lama;
if (nomor==101)
harga=100000;
else if(nomor==102)
harga=100000;
else if(nomor==201)
harga=150000;
else if(nomor==202)
harga=175000;
else if(nomor==301)
harga=200000;
else if(nomor==302)
harga=250000;
total=harga*lama;
if (lama>=10)
{if (nomor==101)
{pot=0.1*total;}
else if (nomor==102)
{pot=0.05*total;}
else if (nomor==201)
{pot=0.1*total;}
else if (nomor==202)
{pot=0.05*total;}
else if (nomor==301)
{pot=0.1*total; }
else if (nomor==302)
{pot=0.15*total; }}
else pot=0;
jumbay=total-pot;
clrscr();
cout<<" Bandung Prima Hotel "<<endl;
cout<<"================================"<<endl;
cout<<"Nama Penyewa :"<<nama<<endl;
cout<<"Nomor Kamar :"<<nomor<<endl;
cout<<"Harga Kamar :"<<harga<<endl;
cout<<"Lama Inap :"<<lama<<endl;
cout<<"total Bayar :"<<total<<endl;
cout<<"Potongan :"<<pot<<endl;
cout<<" ================="<<endl;
cout<<"Jumlah Bayar :"<<jumbay<<endl;
getch();
}
#include <conio.h>
#include <iostream.h>
main()
{
char nama[20];
int lama,nomor;
long int harga,jumbay,total, pot;
cout<<" Bandung Prima Hotel"<<endl;
cout<<"====================================="<<endl;
cout<<"Masukkan Nama Penyewa:";cin>>nama;
cout<<"Masukkan Nomor Kamar[101/102/201/202/301/302:";cin>>nomor;
cout<<"Masukkan Lama Inap :";cin>>lama;
if (nomor==101)
harga=100000;
else if(nomor==102)
harga=100000;
else if(nomor==201)
harga=150000;
else if(nomor==202)
harga=175000;
else if(nomor==301)
harga=200000;
else if(nomor==302)
harga=250000;
total=harga*lama;
if (lama>=10)
{if (nomor==101)
{pot=0.1*total;}
else if (nomor==102)
{pot=0.05*total;}
else if (nomor==201)
{pot=0.1*total;}
else if (nomor==202)
{pot=0.05*total;}
else if (nomor==301)
{pot=0.1*total; }
else if (nomor==302)
{pot=0.15*total; }}
else pot=0;
jumbay=total-pot;
clrscr();
cout<<" Bandung Prima Hotel "<<endl;
cout<<"================================"<<endl;
cout<<"Nama Penyewa :"<<nama<<endl;
cout<<"Nomor Kamar :"<<nomor<<endl;
cout<<"Harga Kamar :"<<harga<<endl;
cout<<"Lama Inap :"<<lama<<endl;
cout<<"total Bayar :"<<total<<endl;
cout<<"Potongan :"<<pot<<endl;
cout<<" ================="<<endl;
cout<<"Jumlah Bayar :"<<jumbay<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar