Question: Given the following main () function: int main) int numDays: float totalCost char roomCategory: cout > roomCategory: cout> numDays totalCost = calculate TotalCost(roomCategory, numDays): displayTotalCost

 Given the following main () function: int main) int numDays: float

Given the following main () function: int main) int numDays: float totalCost char roomCategory: cout > roomCategory: cout> numDays totalCost = calculate TotalCost(roomCategory, numDays): displayTotalCost (totalCost): return 0; > a) Write the function definition for calculateTotalCost() that calculates the total cost for staying at the Green View Hotel. The calculation of the total cost is based on the room rate, the number of days to stay and any applicable discount as stated in the following table: Room Category Room Rate Discount Standard RM250 5% Deluxe RM350 10% Suite RM500 15% (7.5 m b) Write the function definition for displayTotalCost that displays the total co 2/3 an appropriate message. (2.5 marks) ... ... )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!