Im having trouble with the calculations. This is the problem.
Betty's Bagelry charges $3.80 for a baker's dozen of bagels (13 bagels). The price for half a dozen (6 bagels) is $2.60. A single bagel costs $ .50. Betty is an honest merchant. Customers always get the best price on an order, even if they get more bagels than ordered. For example, a customer that orders 10 bagels would pay $4.60 (2.60 for a half dozen bagels plus $2.00 for 4 single bagels. Betty gives her customers 13 bagels, saving the customer $.80.
Write a C++ program that will help Betty help her customers. Your program prompts the user for the number of bagels. If then calculates the customer's payment two ways. First it finds the price of the smallest multiple of 13 bagels that is closest to the customer's order. It then calculates the price of the customer's order so that the customer's payment is the smallest amount possible with the customer getting the exact number of bagels ordered. If the first method is the smallest amount the program outputs the number of bagels the customer will receive along with the dollar amount owed, and the dollar amount saved. Otherwise just print the number of bagels received and the dollar amount owed.
So far i have this:
using namespace std;