Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Programming Assignment
- Develop a C++ program that will determine whether a department-store customer has
- exceeded the credit limit on a charge account. For each customer, the following facts are
- available:
- a) Account number (an integer)
- b) Balance at the beginning of each month
- c) Total of all items charged by this customer this month
- d) Total of all credits applied to this customer’s account this month
- e) Allowed credit limit
- The program should use a loop to input each of these sets of facts, calculate the new
- balance (=beginning balance + charges – credits) and determine whether the new balance
- exceeds the customer’s credit limit. For those customers whose credit limit is exceeded,
- the program should display the customer’s account number, credit limit, new balance and
- the message, “Credit Limit Exceeded.”
- How your code should run:
- Enter account number (or -1 to quit): 100
- Enter beginning balance: 5394.78
- Enter total charges: 1000.00
- Enter total credits: 500.00
- Enter credit limit: 5500.00
- New balance is 5894.78
- Account: 100
- Credit Limit: 5500.00
- Balance: 5894.78
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement