Question: 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.

 By using STRUCTURE statement, write a C Program to calculate the

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. 5. #unc lude struct bookType char title[100; float price; int aty float total; Figure 2 Sample output: How nany order(s)? Enter book title :Book A Enter book prico RH 56.60 Enter quantity ordered: 35 Enter book title Book B Enter book price: RH 89.50 Enter quantity ordered: 45 Enter book title Book c Enter book price: RH 90.00 Enter quantity ordered: 25 70% Title Price ty Total Book A Book B Book C 56.6035 89.50 45 90.00 25 1981 00 4027 50 2250 00 Discount 0.00 402, 75 0.00 After Discount 1981.00 3624.75 2250.00 Total anount payable: RH 7855. 75

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!