Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Kid Fun Land Penang offers great discount for entrance during the school holiday. The following are the price and discount given for children and adults.
Kid Fun Land Penang offers great discount for entrance during the school holiday. The following are the price and discount given for children and adults. Ticket Type Children Adults Normal Price (RM) 45.00 5.00 If the total price is more than RM 200.00, 17% discount will be given from the total price. Otherwise, 15% discount will be given from the total price. a) Define a function named calcPrice (int, int) that receives the number of children and adults. The function will calculate and return the total price. (3 marks) b) Define a function named calcDiscount (double) that receives ticket types in and total price. The function will calculate and return discount. (4 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started