Page 1 of 1

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

Posted: Fri May 20, 2022 2:37 pm
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