Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ You are hired to write a program for Abang Mat, who is a satay seller. He sells TWO (2) types of satay; chicken satay

image text in transcribedc++

You are hired to write a program for Abang Mat, who is a satay seller. He sells TWO (2) types of satay; chicken satay and lamb satay. The price of the satay is as shown in Table 1. Table 1 Type of Satay Price (per stick) Chicken RM1.00 Lamb RM1.50 Abang Mat will give 10% discount to customers who buy more than 100 pieces of satay. The program will: read the type of satay that the customer would like to buy print the bill for each customer based on the quantity and discounts. loop to read and process the purchasing information of FIVE (5) customers. You may assume that the users will always key in a correct input, hence input validation is not needed. A sample output shown in Figure 1: Welcome to Kedai Sate Abang Mat You are customer number :What would you like to order? 1. Satay Ayam 2. Satay Kambing Enter your option:1 Quantity: 12 Bill : RM 12.00 Welcome to Kedai Sate Abang Mat You are customer number 1: What would you like to order? 1. Satay Ayam 2. Satay Kambing Enter your option:2 Quantity: 36 Bill : RM 54.00 Welcome to Kedai Sate Abang Mat You are customer number 4: What would you like to order? 11. Satay Ayam 2. Satay Kambing Enter your option:1 Quantity: 150 Bill RM 135.00 Figure 1 [6 marks] (a) Write an algorithm (either a pseudocode or a flowchart) to produce the program as shown in Figure 1. (b) Write a program based on the algorithm answered in (a). [9 marks]

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Write down the circumstances in which you led.

Answered: 1 week ago