Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //cin, cout
- #include <iomanip> //setw, setprecision
- using namespace std;
- const double tax = 8.25;
- void DisplayMenu();
- int GetChoice();
- int GetNumberOfItems(int &quantity);
- double CalculateTotalItemCost(int choice, int quantity);
- double CalculateSalesTax(double totalItemCost);
- void CreateSalesReceipt(int choice, int quantity, double cost, double totaltax, double total);
- int main ()
- {
- int choice;
- double rate, quantity, cost, total, totaltax;
- cout << fixed << showpoint << setprecision(2);
- DisplayMenu ();
- cin >> choice;
- GetNumberOfItems (&quantity);
- cin >> quantity;
- void DisplayMenu ()
- {
- cout << "PLEASE CHOOSE ONE OF THE FOLLOWING: \n\n" ;
- cout << "Vanilla Cone - $1.35\n" ;
- cout << "Lemonade - $2.25\n" ;
- cout << "Bubblegum Slush - $3.15\n" ;
- cout << "Yogurt Breeze - $4.05\n" ;
- }
- void GetNumberOfItems (int quantity)
- {
- cout << "\nPLEASE ENTER # OF ITEMS: "
- cin << quantity
- return quantity;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement