#include <iostream>//header file included//
using std::cout;
using std::cin;
using std::endl;
int main()//main declared//
{
int accountnumber;//variable declared to accept the account number//
int i=0;
double balatbeg;
double charges;
double credits;
double newbalance;
double allowedlimit;
while (i<=10)
{
cout<<"Enter the account number of the customer:"; //Statement to take the account number//
cin>>accountnumber; //variable to store accout number//
cout<<"Enter the Balance at the Beginning of the month:"; //Statement to take to balance at the beginning of the month//
cin>>balatbeg; //variable to store balance at the beginning//
cout<<"Enter the Total of all items charged for this month:";
cin>>charges; //variable to store items charged//
cout<<"Enter the total number of credits applied to this customer:";
cin>>credits; //variable to store credits//
cout<<"Enter the Allowed credit limit for this customer:";
cin>>allowedlimit; //variable to store limit//
newbalance=balatbeg+charges-credits; //To calculate the New Balance
if (newbalance>=allowedlimit) //To check the condition and display appropriate message//
cout<<"Credit Limit Exceeded for"<<accountnumber<<"with a new balance"<<newbalance<<"And credit limit"<<allowedlimit;
cout<<endl;
cout<<endl;
} //closing the while condition//
i=i+1; //incrementing the value of i//
return 0;
} //closing the main function//
|