Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. By using STRUCTURE statement, write a C Program to calculate the total price for purchasing book. The input data are: Book's title, price and

image text in transcribed

5. By using STRUCTURE statement, write a C Program to calculate the total price for purchasing book. The input data are: Book's title, price and quantity. The program must be able to calculate the total price for each book title. If the quantity of books sold is greater than 40, a discount of 10% will be given. Display book's title, price, quantity, total price for each title, discounted amount for each title, and sum of amount payable to the supplier. You should start your program using the segment shown in Figure 2. #include struct bookType char title[100]; float price; int qh floct tota, Figure 2 Sample output How many order()? Enter book title Book A Enter book pric: RM 56.60 Enter quantity ordered: 35 Enter book title Book B Enter book price: RM 89.50 Enter quantity ordered: 4 Enter book title :Book C Enter book pric: RM 90.00 Enter quantity ordered: 25 Total 981.0 4027.50 2250.00 Discount 0.00 402.75 0.00 Book' Title Price aty Book A Book B Book C 56.60 35 89.50 5 90,00 25 After Discount 1981.0 3624.75 2250.00 Total anount payable: RM 7855.75

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions