Advertisement
SmellyBadger

Untitled

Oct 17th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include <iomanip>
  4.  
  5.  
  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. //int customerNumber; // to keep track of total number of customers
  19.  
  20.  
  21. cout << "Enter \"c\" to checkout a new customer, or \"q\" to close batch and print a daily report." << endl;
  22. cin >> action;
  23.  
  24.  
  25. while ( action != 'q') // Outer Loop
  26. {
  27. while (action == 'c')
  28. {
  29. cout << "Enter \"h\" for HARD COPY, any other key for PAPER_COPY:" << endl;
  30. cin >> action;
  31. if (action == 'h' || action == 'H')
  32. {
  33. cout << bookCost << endl;
  34. bookCost = bookCost + HARD_COPY;
  35. }
  36. }
  37.  
  38. }
  39.  
  40.  
  41.  
  42. //if (action != 'h' || action != 'H')
  43. //{
  44. //cout << bookCost << endl;
  45. //bookCost = bookCost + PAPER_COPY;
  46. //}
  47.  
  48. //cout << "Enter \"d\" if customer receives a discount, any other key if they don't:" << endl;
  49. //cin >> action;
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. cin.get();
  58. cin.get();
  59.  
  60. return 0;
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement