// Devleop a C++ program that will determine if a department store customer has exceeded the crdit limit on a charge account
// For each customer, the following facts are availabe:
// A) Account number ( an integer)
// b) Balance at the beginning of the month
// c) Total of all credits applies to this costomer's account this month
// e) allowed crdit limit
// the program should input each of these facrts, calculate the new balance (= beginning balance + charges - crdits ) and
// determine if the new balance exceeds the customer's credit limit, For those customers whose crdit limit is exceeded,
// the program should display the customer's accont number, credit limit, new balance, and the message "Credit limit exceeded."
//===================sample output=================\\
Enter account number (-1 to end) : 100
enter beginning balance: 5394.78
enter total charges: 1000.00
enter total credits: 500.00
enter credit limit: 5500.00
account: 100
credit limit: 5500.00
balance: 5894.78
credit limit exceeded.

enter account number (-1 to end): 200

enter beginning balance: 1000.00
enter total charges: 123.45
enter total credits: 321.00
enter credit limit: 1500.00

enter account number (-1 to end): -1
Last edited on
 ``123456789101112131415161718192021222324252627282930313233343536373839`` ``````#include using namespace std; int main() { int accountNumber; float balance, charge, credit, creditLimit, newBalance = 0.0; cout << "Enter account number (-1 to end) : "; cin >> accountNumber; while ( accountNumber != -1 ) { cout << "Enter beginning balance: "; cin >> balance; cout << "Enter total charges: "; cin >> charge; cout << "Enter total credits: "; cin >> credit; cout << "Enter credit limit: "; cin >> creditLimit; newBalance = balance + charge - credit; if ( newBalance >= creditLimit ) { cout << "Account: " << accountNumber << endl; cout << "Credit Limit: " << creditLimit << endl; cout << "Balance: " << newBalance << endl; cout << "Credit Limit Exceeded."; } cout << "Enter account number (-1 to end) : "; cin >> accountNumber; } return 0; }``````