Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C programming only for the coding EMK11003 Computer Programming Laboratory Module 5 3. Proton Edar has organized a year-end sale to clear out their

image text in transcribed

Using C programming only for the coding

EMK11003 Computer Programming Laboratory Module 5 3. Proton Edar has organized a year-end sale to clear out their stock with special rebate 2.5% for every car purchased with price tag more than RM 70,000. Write a program to calculate Proton Edar's sales figure for the event based on Table 1 below. A rebate 2.5% will be deducted from the car price tag for each car with initial price tag more than RM 70,000, Display car type, car price, rebate amount, price after rebate, quantity ordered and finally calculate the total sales that Proton Edar should received for all ordered units. Refer Figure 1 for output sample. Requirement: 1. Define and declare struct carType with model (char), price (float), unit (int) and total (float) as members. 2. Declare an array named rebate to store calculated rebate amount. 3. Declare an array named after_rebate to store calculated total amount after rebate. 4. Declare an array of structure carType named car to store all the information for FIVE (5) cars. Car's Model Saga Pesona Inspira Exora Preve Table 1: Sales of Proton Edar Price (RM) 49,913 59,713 92,016 88,988 72,990 Total Unit Ordered 15 8 7 10 13 Sample output: Enter car type: Saga Enter car price(RM): 49913 Enter unit ordered: 15 Enter car type: Pesona Enter car price(RM): 59713 Enter unit ordered: 8 Car Brand Price(RM) Rebate(2.5%) After Rebate(RM) Quantity Total Price(RM) ********************************************************************************** Saga 49913.00 0.00 49913.00 15 748695.00 Pesona 59713.00 0.00 59713.00 8 477704.00 Inspira 92016.00 2300.40 89715.60 7 628009.19 Exora 88988.00 2224.70 86763.30 10 867633.00 Preve 72990.00 1824.75 71165.25 13 925148.25 Total year-end sales: RM 3647189.44 Figure 1 Faculty of Electrical Engineering Technology, Universiti Malaysia Perlis (UniMAP)

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_2

Step: 3

blur-text-image_3

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Explain the ways that projects are identified and initiated.

Answered: 1 week ago