Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use while loop and could you put an explanation on each line You will write a program that will read an integer qty and

please use while loop and could you put an explanation on each line image text in transcribed
You will write a program that will read an integer qty and a double T. This information qty represents the number of items that will be purchased at price T. When computing the cost there will be additional values that need to be computed. The initial cost is qty*T. The sales tax which is computed as 4.4% of the initial cost. The handling fee. The handling fee is dependent on the quantity sold. The handling fee is illustrated by the following progression (see table below). This fee exists because shipper bundles quantities in groups of seven with special packaging Additional Items fee. We need to ship those items that cannot be grouped into a group of seven using individual packing. The additional items fee is $2 times the number of items that cannot be packaged into group of 7. For example if qty=25 then there are 3 groups of 7 and the additional items fee is $2*4 because 4=25-7*3. Handling Fee Quantity 0 1 0 0 6 7 21 0 9.00 9.00 13 14 15 9.00 18.00 18.00 20 21 18.00 27.00 Continue in this manner Total cost - handling fee+ the initial cost, + sales tax + additional items fee You need to compute and output the quantity, price, handling fee, the initial cost, the sales tax, the additional items fee and the total cost in a formatted manner. You are required to use good programming practices and well-comment your code. For fixed constants, you should use preprocessor definitions. Also you need to organize you work as follows by writing code in pieces that compute the initial cost, then computes the sales tax, then computes the handling fee, compute additional items fee. and lastly computes the total cost

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions