#include <iostream>
#include <string>
using namespace std;
struct ac
{
int ac_number;
string ac_name;
float de;
float withdraw;
};
int main()
{
ac acounts[10];
// assin account number
acounts[0].ac_number = 1;
acounts[1].ac_number = 2;
acounts[2].ac_number = 3;
acounts[3].ac_number = 4;
acounts[4].ac_number = 5;
acounts[5].ac_number = 6;
acounts[6].ac_number = 7;
acounts[7].ac_number = 8;
acounts[8].ac_number = 9;
acounts[9].ac_number = 10;
// assign name of accounts
acounts[0].ac_name = "Ashfaq";
acounts[1].ac_name = "Saif";
acounts[2].ac_name = "Ansir";
acounts[3].ac_name = "Zoha";
acounts[4].ac_name = "Abraz";
acounts[5].ac_name = "Aysha";
acounts[6].ac_name = "Manal";
acounts[7].ac_name = "Muzammal";
acounts[8].ac_name = "Aamir";
acounts[9].ac_name = "Naveed";
// assign balance of accounts
acounts[0].de = 0;
acounts[1].de = 0;
acounts[2].de = 0;
acounts[3].de = 0;
acounts[4].de = 0;
acounts[5].de = 0;
acounts[6].de = 0;
acounts[7].de = 0;
acounts[8].de = 0;
acounts[9].de = 0;
int ac;
while (5)
{
cout << "Enter acount number:" << endl;
cin >> ac;
cin.ignore();
for (int i = 0; i < 10; i++)
{
if (ac == acounts[i].ac_number)
{
float _input_de, _input_wi;
cout << "Enter your Depsit Money:" << endl;
cin >> _input_de;
cout << "Enter Money that you want to Withdraw:" << endl;
cin >> _input_wi;
cin.ignore();
cout << "Thank you for using Eaglesoft Banking System:" << endl;
acounts[i].de = acounts[i].de + _input_de;
acounts[i].de = acounts[i].de - _input_wi;
cout << "*****Your Account Details*****" << endl;
cout << "Account Number: " << acounts[i].ac_number << endl;
cout << "Account Name: " << acounts[i].ac_name << endl;
cout << "Your current balance is :" << acounts[i].de << endl;
}
}
}
return 0;
}