Dani has already provided the basis of a solution. I think it's equally as important to understand *how* you come up with a solution to problems such as this. You need an approach to problem solving.
There's no rocket science involved; you simply need to go through your problem statement, break it down into steps, refine the steps, then implement those steps as C++ code. Let's work it through.
We know from the first paragraph that our program is going to deal with customers, multiple customers, and that for each the following information is required:
Account Number
Balance at start of month
Total monthly charge
Total monthly credits
Credit limit
We can already envisage the use of variables for these, e.g.
int accountNumber;
double startBalance;
double monthlyCharge;
double monthlyCredit;
double creditLimit;
but that's a level of detail that we don't need to worry about yet.
In the second paragraph it says we should use a while structure to input those values, calculate the new balance, check if the credit limit has been exceeded, if it has display the customer details and a warning message. This paragraph describes the steps we need, so let's list them, it will form the basis of our solution (Stage 1):
1. Loop while we have more customers
2. Read in the customer details
3. Calculate the customer's new account balance
4. If the limit has been exceeded
5. Output the customer account details and warning message
6. end if
7. end loop
That's a very simple form of pseudocode, in English. A basic design, if you like, for our solution.
Now we refine those steps a little in Stage 2:
1. Loop while we have more customers
2.1 Input the Account Number
2.2 input the balance at start of month
2.3 Input the total monthly charge
2.4 Input the total monthly credit
2.5 Input the credit limit
3. Set new balance to start balance - charges + credits
4. If new balance is greater than credit limit
5.1 Output account number
5.2 Output credit limit
5.3 Output new balance
5.4 Output "Credit Limit Exceeded"
6. End if
7.1 Prompt for more customers
7.2 End loop
We can refine a number of these steps further, Stage 3, for example:
2.1 Input account number
becomes:
2.1.1 Prompt for account number
2.1.2 Read in account number
and so on. We may refine some steps several more times (and others not at all). Once we have refined these steps sufficiently we start to translate them to code (Stage 4). Here's an example that matches the steps above, with some implementation tweaks.
bool moreCustomers=true;
// step 1
while(moreCustomers==true)
{
// step 2.1
cout << "Enter the account number: " << flush;
int accountNumber;
cin >> accountNumber;
// step 2.2
cout << "Enter the balance at start of month: " << flush;
double startBalance;
cin >> startBalance;
// step 2.3
cout << "Enter the total monthly charges: " << flush;
double monthlyCharge;
cin >> monthlyCharge;
// step 2.4
cout << "Enter the total monthly credits: " << flush;
double monthlyCredit;
cin >> monthlyCredit;
// step 2.5
cout << "Enter the credit limit: " << flush;
double creditLimit;
cin >> creditLimit;
// step 3
double newBalance = startBalance-monthlyCharge+monthlyCredit;
// step 4
if(newBalance > creditLimit){
// step 5.1
cout << "Account number: " << accountNumber << endl;
// step 5.2
cout << "Credit limit: " << creditLimit << endl;
// step 5.3
cout << "New balance: " << newBalance << endl;
// step 5.4
cout << "Credit limit exceeded" << endl;
// step 6
}
// step 7.1
cout << "Another? " << flush;
char yesNo;
cin >> yesNo;
if(yesNo != 'y'){
moreCustomers=false;
}
// step 7.2
}
That's a simplified approach (and the code hasn't been tested, it's the approach that matters) but you get the idea. It's really a question of designing the solution before you code it. Can you see how the design was taken straight from the problem statement and broken down into simple steps, then refined, then coded?
Later you'll want to use more sophisticated design techniques, but this should help you to understand how to tackle new problems, even if you don't have a clue how to code it at the start.
By the way, using this method you might find that you can code 4 or 5 of the steps yourself but that, for instance, the remaining steps are unclear to you because you're still learning. You can then post the code you have and people will help you with the gaps.
Good luck.