Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include
- 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; //
- cout << "Enter "c" to checkout a new customer, or "q" to close batch and print a daily report." << endl;
- cin >> action;
- while (action == 'c' || action == 'q') // Not sure that I should be using a loop here.
- {
- if (action == c)
- cout << " Enter book price " << endl;
- }
- cout << "Enter "h" for HARD COPY, any other key for PAPER_COPY:" << endl;
- cin >> action;
- while (action == 'h' || action == 'H')
- {
- cout << bookCost << endl;
- bookCost = bookCost + HARD COPY
- }
- while (action != 'h' || action != 'H')
- {
- cout << bookCost << endl;
- bookCost = bookCost + PAPER_COPY
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement