Flowchart
Flowchart
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
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"
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
totalPrice= (price*length) + p
True
totalPrice=price*length
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++)
arrInt[i]=sum
sum1=arrInt[i]+arrInt[i]
float newTotalprice(float num1, float num2)
float newPrice;
newPrice=num1-(num1*num2);
return newPrice;
End