i wrote it in c++,so it just giving me the matrix.
#include<iostream>
using namespace std;
int main()
{
int account;
do
{
float startBalance, endBalance, allowed, credits, charges;
cout << "Enter account number: ";
cin >> account;
cout << "Enter beginning balance: ";
cin >> credits;
cout << "Enter total charges: ";
cin >> charges;
cout << "Enter total credits: ";
cin >> startBalance;
cout << "Credit limit?: ";
cin >> allowed;
endBalance = startBalance + charges - credits;
if (endBalance > allowed)
cout << "Credit limit exceeded";
}
while (account != -1);
cout<<"enter account number (-1 to end)"<<endl;
return 0;
}