need help
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 customers 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.
Print all dollar amounts to two decimal spaces.
Test your program on the following inputs and two of your own. Make sure you test for all logical possibilities.
10 bagels
24 bagels
13 bagels
14 bagels
Sample output:
How many bagels would you like today? 10
Thank you for your order.
You will receive 13 bagels instead of 10 for a savings of $0.80.
Please pay the cashier $3.80
Press any key to continue
How many bagels would you like today? 24
Thank you for your order.
You will receive 26 bagels instead of 24 for a savings of $1.30.
Please pay the cashier $7.60
Press any key to continue
How many bagels would you like today? 13
Thank you for your order. Please pay the cashier $3.80
Press any key to continue
How many bagels would you like today? 14
Thank you for your order. Please pay the cashier $4.30
Press any key to continue
my code
#include<iostream>
using namespace std;
int main()
{
double bakers=3.80, half=2.60, single=0.50;
int bagels;
cout<<"how many bagels would you like?"<<endl;
cin>>bagels;
cout<<"total="<<(bagels)*(single)<<endl;
if (bagels>13)
cout<<"You should buy the bakers dozen for a savings of\t"<<(bagels*single)-(bakers)<<endl;
else if(bagels>6)
cout<<"you should buy a half dozen for a savings\t"<<(bagels*single)-(half)<<endl;
return 0;
}
i dont know how to make it say you will get 26 bagels instead of 24 for example.

