Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 #include using namespace std;

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is the function of the trial balance?

Answered: 1 week ago

Question

4. Explain why strategic planning is important to all managers.

Answered: 1 week ago