I have been working on this for some time now. I need to little help from someone that knows what they are doing. Here is my answer to the problem:
#include <iomanip>
using namespace std;
int main() {
// declaring variables
int pounds = 0;
double pricePer = 0.0;
const int shipCharge = 15;
char shipping = ' ';
double total = 0.0;
// enter input
cout << "Enter number of pounds: ";
cin >> pounds;
cout << "Enter Price Per Pound: ";
cin >> pricePer;
cout << "Does the Customer want shipping: ' '";
cin >> shipping;
// calculate the total
if (shipping == 'Y')
{
total = (pounds * pricePer) + shipCharge;
cout << "Total Amount Owned:$ "<< total << endl;
}
else
{
total = pounds * pricePer;
cout << "Total Amount Owed:$ "<<total<<endl;
}
//end if
system("pause");
return 0;
}
//end of main function
The Problem is this: I need a program that allows a clerk to enter the number of pounds of tea ordered, the price per pound, and whether or not the customer should be charged a $15 shipping fee determined when asked if they want shipping or not. The program should calculate and display the total amount the customer owes.
I know there is someone out there that will look at this and see what the problem is. I just need a little nudge. Many Thanks in advance.