Question: Please write the coding clearly.I need to understand how to solve this question. QUESTION 2 WashNDry is a self-service laundry mart. The laundry machine operates

 Please write the coding clearly.I need to understand how to solve

this question. QUESTION 2 WashNDry is a self-service laundry mart. The laundry

Please write the coding clearly.I need to understand how to solve this question.

QUESTION 2 WashNDry is a self-service laundry mart. The laundry machine operates using 50 cent coins. There are two types of laundry machines and dryers charges for each type of machine. The following tables show the Laundry machine Charge(RM)- 4.50 10 kg maximum capacity 15 kg maximum capacity 6.00 Charge (RM) 3.50 4.00 Dryer 10 kg maximum capacity 15 kg maximum capacity A customer may use more than one machine. For example: If the customer uses: 10 kg maximum capacity - 2 laundry machine 15 kg maximum capacity -1 laundry machines 10 kg maximum capacity-1 dryer The charges would be: 2 * 4.50 + 1 * 6.00 + 1 * 3.50 = RM18.5 Therefore, 37 pieces of 50 cent coins are needed by this customer Based on the information: a) Write a function named int calccoins1 (int,int,int,int) that receives the number of laundry machine and dryer used by the customer. The function will determine how many pieces of 50 cents coins a customer needs to do the laundry 6 marks) b) Write a function named int calccoins2 (int,int) that receives number of detergent and softener. The function will calculate the number of 50 cents coins (4 marks) needed for the laundry detergent and the softener if the cost is RM1.00 each

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!