Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- const float PAPER_COPY = 2;
- const float HARD_COPY = 5;
- int main()
- {
- //float bookCost; // Represents the cost of a book
- char action; //
- //int customerNumber; // to keep track of total number of customers
- cout << "Enter \"c\" to checkout a new customer, or \"q\" to close batch and print a daily report." << endl;
- cin >> action;
- while ( action != 'q') // Outer Loop
- {
- while (action == 'c')
- {
- cout << "Enter \"h\" for HARD COPY, any other key for PAPER_COPY:" << endl;
- cin >> action;
- if (action == 'h' || action == 'H')
- {
- cout << bookCost << endl;
- bookCost = bookCost + HARD_COPY;
- }
- }
- }
- //if (action != 'h' || action != 'H')
- //{
- //cout << bookCost << endl;
- //bookCost = bookCost + PAPER_COPY;
- //}
- //cout << "Enter \"d\" if customer receives a discount, any other key if they don't:" << endl;
- //cin >> action;
- cin.get();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement