#include<iostream>
#include<vector>
using namespace std;
struct Account
{
int userID;
string username;
string email;
int cnic;
double balance;
};
int startUserID = 10001;
vector<Account> accounts;
void accountCreation(){
Account newAccount;
cout<<"======Account Creation======"<<endl;
cout<<"Enter Full Name: ";
getline(cin, newAccount.username);
cout<<"Enter Email: ";
getline(cin, newAccount.email);
cout<<"Enter CNIC (without dashes): ";
cin>>newAccount.cnic;
cout<<"Enter initial Balance: ";
cin>>newAccount.balance;
newAccount.userID = startUserID++;
cout<<"Congrats! Account Created Successfully!"<<endl
<<"Your userID is: "<<newAccount.userID<<endl;
accounts.push_back(newAccount);
}
void showAccounts(){
cout<<"======All Accounts======"<<endl;
for(int i = 0; i<accounts.size(); i++){
cout<<"UserID: "<<accounts[i].userID<<endl;
cout<<"Name: "<<accounts[i].username<<endl;
cout<<"Email: "<<accounts[i].email<<endl;
cout<<"Balance: $"<<accounts[i].balance<<endl;
cout<<"===============================";
}
}
int main(){
cout<<" _ __ ___ ____ _ _ _ __"<<endl;
cout<<"| |\\ \\ / / | | _ \\ /\\ | \\ | | |/ /"<<endl;
cout<<"| | \\ \\ / /| | | |_) | / \\ | \\| | ' / "<<endl;
cout<<"| | \\ \\/ / | | | _ < / /\\ \\ | . ` | < "<<endl;
cout<<"| |___\\ / | |____ | |_) / ____ \\| |\\ | . \\ "<<endl;
cout<<"|______\\/ |______| |____/_/ \\_\\_| \\_|_|\\_\\"<<endl;
accountCreation();
showAccounts();
}