Advertisement
SmellyBadger

Untitled

Oct 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include <iomanip>
  4.  
  5. #include
  6.  
  7. using namespace std;
  8.  
  9. const float PAPER_COPY = 2
  10. const float HARD_COPY = 5
  11.  
  12. int main()
  13.  
  14. {
  15.  
  16.     float bookCost; // Represents the cost of a book
  17.     char action; //
  18.  
  19.     cout << "Enter "c" to checkout a new customer, or "q" to close batch and print a daily report." << endl;
  20.         cin >> action;
  21.  
  22.     while (action == 'c' || action == 'q') // Not sure that I should be using a loop here.
  23.     {
  24.         if (action == c)
  25.             cout << " Enter book price " << endl;
  26.  
  27.     }
  28.    
  29.  
  30.     cout << "Enter "h" for HARD COPY, any other key for PAPER_COPY:" << endl;
  31.     cin >> action;
  32.     while (action == 'h' || action == 'H')
  33.     {
  34.         cout << bookCost << endl;
  35.         bookCost = bookCost + HARD COPY
  36.     }
  37.     while (action != 'h' || action != 'H')
  38.     {
  39.         cout << bookCost << endl;
  40.         bookCost = bookCost + PAPER_COPY
  41.     }
  42.  
  43.  
  44.  
  45.    
  46.  
  47.        
  48.  
  49.        
  50.  
  51.    
  52.  
  53.     return 0;
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement