Write a code snippet to answer the following question. Just the code that goes inside the main, no need to actually writ

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a code snippet to answer the following question. Just the code that goes inside the main, no need to actually writ

Post by answerhappygod »

Write a code snippet to answer the following question. Just the
code that goes inside the main, no need to actually write the
main.
Suppose that amountDue is a double
variable to store the amount a customer will pay to fax some
document, and numPages is an integer
variable to store the number of pages to be faxed.  Write a C++
code snippet that determines and outputs the amount a customer
should pay for faxing several pages of a document, you should first
find out how many pages the customer wishes to fax and then
calculate using the rates shown below.
The rate are as follows:
the service charge is $9.99 in all cases,
to fax the first 10 pages (Pages 1 - 10 ) costs $0.25 per
page,
the subsequent 15 pages (Pages 11 - 25) costs $0.30 per
page,
and pages over 25 cost $0.40 per page.
This means if the customer wishes to fax 16 pages, they are
charged $0.25 each for the first 10 pages, and then $0.30 for the
remaining 6
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply