Question
im not sure why my code isnt working? include #include using namespace std; int main() { int amountOfCoffee; double Price; char salesTaxChargeability; double TotalAmount; const
im not sure why my code isnt working?
include
int main() { int amountOfCoffee; double Price; char salesTaxChargeability; double TotalAmount; const double SALESTAX = 0.035; // 3.5 %
cout << " Enter the number of pounds of coffee ordered in Pounds :"; cin >> amountOfCoffee; cout << " Enter the price of coffee per Pound :"; cin >> Price; cout << " Is sales tax Chargeable (y or n): "; cin >> salesTaxChargeability; if ( (salesTaxChargeability == 'y') || (salesTaxChargeability == 'Y') ) TotalAmount = (amountOfCoffee * Price) + (SALESTAX * (amountOfCoffee * Price)); else TotalAmount = (amountOfCoffee * Price); cout << " Total amount the customer owes : " << setprecision(8) << TotalAmount; cout << " Thank you for using the applicable.. Goodbye" << endl; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started