Calculate the sellingPrice using the formula: sellingPrice = (originalPrice + originalPrice*0.80) * 0.90The information needed to calculate the selling price is the original price and the marked-up percentage.
17. Suppose that the cost of sending an international fax is calculated as follows: Service charges $3.00, $0.20 per page for the first 10 pages, and $0.10 for each additional page. Design an algorithm that asks the user to enter the number of pages to be faxed. The algorithm then uses the number of pages to be faxed to calculate the amount due.Suppose that numOfPages denotes the number of pages to be faxed and billingAmount denotes the total charges for the pages faxed. To calculate the total charges, you need to know the number of pages faxed.If numberOfPages is less than or equal to 10, the billing amount is service charges plus (numOfPages*0.20); otherwise, billing amount is service charges plus 10*0.20 plus(numOfPages-10)*0.10. You can now write the algorithm as follows:a.Get numOfPages.b.Calculate billing amount using the formula: if (numOfPages is less than or equal to 10) billingAmount = 3.00 + (numOfPages * 0.20); otherwise billingAmount=3.00 +10*0.20 +(numOfpages – 10)*0.10;
conver it into c++ code
Answers
Explanation:
Calculate the sellingPrice using the formula: sellingPrice = (originalPrice + originalPrice*0.80) * 0.90The information needed to calculate the selling price is the original price and the marked-up percentage.
17. Suppose that the cost of sending an international fax is calculated as follows: Service charges $3.00, $0.20 per page for the first 10 pages, and $0.10 for each additional page. Design an algorithm that asks the user to enter the number of pages to be faxed. The algorithm then uses the number of pages to be faxed to calculate the amount due.Suppose that numOfPages denotes the number of pages to be faxed and billingAmount denotes the total charges for the pages faxed. To calculate the total charges, you need to know the number of pages faxed.If numberOfPages is less than or equal to 10, the billing amount is service charges plus (numOfPages*0.20); otherwise, billing amount is service charges plus 10*0.20 plus(numOfPages-10)*0.10. You can now write the algorithm as follows:a.Get numOfPages.b.Calculate billing amount using the formula: if (numOfPages is less than or equal to 10) billingAmount = 3.00 + (numOfPages * 0.20); otherwise billingAmount=3.00 +10*0.20 +(numOfpages – 10)*0.10;
conver it into c++ code