Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Delicious Bakery is giving a discount based on the weight of cake which is 10% for 2 kg and 5% for 1 kg. Customer

image text in transcribed

image text in transcribed

image text in transcribed

3. Delicious Bakery is giving a discount based on the weight of cake which is 10% for 2 kg and 5% for 1 kg. Customer can buy more than 1 cake for the same type. Program B calculates and displays the total payment that a customer must pay when ordering cakes. Table 2 shows the type and price of the cake. The YourPayment function will calculate the total payment and the results obtained from this function will be sent to main function for printing. Study Program B to answer questions a, b and c. Type 1 2 3 Table 2: The Type and Price of Cake Weight of cake Price 2 kg RM 70 1 kg RM 38 12 kg RM 20 #include (a) // Function prototype void main() { float price, payment; int quantity; int type: // Input section cout>type; cout>quantity; // Process section payment=(b) //Function Calling // Output section cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions