Question: C++, please! Write a program to calculate the cost of printing at a Print & Ship store. The store charges a base cost for working
C++, please!

Write a program to calculate the cost of printing at a Print & Ship store. The store charges a base cost for working with the printer, and a specific printing cost that depends on the number of pages printed. Your program prompts the user for the following in this order: The base cost for using the printer (type double) "Enter the base cost for using the printer." Number of pages to be printed (type double) "Enter the number of pages to be printed:" The cost of printing one page (type double) "Enter the cost for printing one page: Your program prints the total cost of printing (type double) "The total cost of printing is: Calculate the cost of printing using this formula: totalCost = (number of pages to print * cost per page) + base cost for using printer If the number of pages printed is less than 5, then the store charges a fixed printing charge of 3.5 times the cost of printing one page: totalCost = (3.5 * cost per page) + base cost for using printer Example 1: baseCost = $4.50, pages Printed = 2, costPerPage = $0.58 Since the number of pages printed is less than 5: totalCost = 3.5 * 0.58 +4.5 = 6.53 Expected output: Enter the base cost for using the printer: 4.50 Enter the number of pages to be printed: 2 Enter the cost for printing one page! 0.58 The total cost of printing is: 6.53 Example 2: baseCost = $5.00, pagesPrinted = 12, costPerPage = $0.6 Since the number of pages printed is greater than or equal to 5: totalCost = 12 * 0.6 + 5 = 12.2 Expected output: Enter the base cost for using the printer: 5.00 Enter the number of pages to be printed: 12 Enter the cost for printing one page: 0.6 The total cost of printing is: 12.2 Please add the main() function only in the answer box
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
