Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. #include <iostream>    //cin, cout
  2. #include <iomanip>     //setw, setprecision
  3. using namespace std;
  4.  
  5.  
  6.  
  7. const double tax = 8.25;
  8.  
  9. void DisplayMenu();
  10. int GetChoice();
  11. int GetNumberOfItems(int &quantity);
  12. double CalculateTotalItemCost(int choice, int quantity);
  13. double CalculateSalesTax(double totalItemCost);
  14. void CreateSalesReceipt(int choice, int quantity, double cost, double totaltax, double total);
  15.                        
  16.  
  17. int main ()
  18. {
  19.  
  20.  int choice;
  21.  double rate, quantity, cost, total, totaltax;  
  22.      
  23.  cout << fixed << showpoint << setprecision(2);
  24.  DisplayMenu ();
  25.  
  26.      cin >> choice;
  27.      
  28.  
  29.  GetNumberOfItems (&quantity);
  30.  
  31.      cin >> quantity;
  32.  
  33.  
  34.  
  35.  
  36.  
  37. void DisplayMenu ()
  38.  
  39. {
  40.      cout << "PLEASE CHOOSE ONE OF THE FOLLOWING: \n\n" ;
  41.      cout << "Vanilla Cone    - $1.35\n" ;
  42.      cout << "Lemonade        - $2.25\n" ;
  43.      cout << "Bubblegum Slush - $3.15\n" ;
  44.      cout << "Yogurt Breeze   - $4.05\n" ;    
  45. }
  46.  
  47. void GetNumberOfItems (int quantity)
  48.  
  49. {
  50.     cout << "\nPLEASE ENTER # OF ITEMS: "
  51.     cin << quantity
  52.    
  53.     return quantity;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement