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 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
Get step-by-step solutions from verified subject matter experts
