start
float newTotalprice(float, float)
Declaration
int a, noPeople, noPhone ,i
int day1, month1, year1
int day2, month2, year2
int choice,days,total1
char pool,respon,member, name[41]
float discount, newPrice,sum=0,sum1=0
float arrInt[7]
int count= 0
int p=150
int price, totalPrice,length, totalSale=0
Display
WELCOME TO SSERAFIM HOTEL
HOTEL RATE:
' Executive Room : RM 200 per night'
'Premium Room : RM 310 per night'
'Panorama Room : RM 470 per night'
'Royal Suite Room : Rm 550 per night'
MEMBER 10% discount
Display "Enter your name"
Get name
Display "Phone Number"
Get noPhone
Display "ROOM AND SUITE"
Get Executive Room,Premium Room,Panorama Room,Royal Suite Room
while(a!=1 && a!=2 && a!=3 && a!=4)
switch (a)
True
Executive Room a==1 Display "Executive Room"
1 Single beds
False Can accommodate 1 person
Private pool (optional)
Complimentary coffee & tea
price=200
True
Premium Room (a==2) Display "Premium Room"
1 Single bed 1 Queen bed
Can accommodate 2
persons
False Private pool (optional)
Complimentary coffee & tea
price=310
Display 'ROOM BOOKING AND
REGISTRATION"
True Display "Name :"
Panaroma Room (a==3) Display "Panaroma Room" Display name
Display "Phone Number :"
Display noPhone
1 Queen bed 1 King beds
Can accommodate 6 persons
False Private pool (optional)
Complementary coffee and tea
Luxury brand bath amenities
price=470 Display "Enter the check in date :"
Get day1,month1,year1
True
Display "Enter the check out date :"
Royal Suite Room (a==4) Display "Royal Suite Room"
Get day2,month2,year2
2 Bedrooms with attached bathroom Display "Do you want pool ? press 'Y' for pool , press 'X'
2 King beds in total without pool"
Can accommodate 10 persons Get pool
Large living and dining area length = day2 - day1
False Private pool (optional)
Complementary coffee and tea
True
default false
You have enter an if (pool=='Y' || pool== 'y')
invalid choice
True if (pool=='X' || pool== 'x')
totalPrice= (price*length) + p
True
totalPrice=price*length
Display total price Display "Hotel member ? (Y/N)"
false
if(member=='y' || member=='Y')
else
True
True
discount=0.1 discount=0.00
sum=newTotalprice(totalPrice,discount)
Display :
"Customer receipt"
"Customer Name : ",name
"Room Type :",a
"Total days : ",length
"Total price: ",sum
False
for (int i= 0; i<7; i++)
Display "enter 'Y' for next customer or X to stop"
True Get response
while(respon=='Y'||respon=='y')
arrInt[i]=sum
for (int i= 0; i<7; i++)
False
Display "Total monthly collection",sum1
"Total Customer :",count True
sum1=arrInt[i]+arrInt[i]
float newTotalprice(float num1, float num2)
float newPrice;
newPrice=num1-(num1*num2);
return newPrice;
End