Quiz
Quiz
class BankAccount
public:
double currbal;
bool deposit()
char again;
system("cls");
if(acctnum1 == acctnum)
currbal += money;
system("cls");
cout<<"Deposit Successful!\n";
else
{
cout<<"Account Number doesn't exist!";
cin>>again;
system("cls");
if(again == 'N')
return false;
return true;
void withdraw()
system("cls");
cin>>money;
// log in part
system("cls");
currbal -= money;
}
else
system("cls");
void disbal()
system("cls");
system("cls");
int disacc()
return acctnum;
}
};
int main()
BankAccount acct1;
int choice;
acct1.acctnum = 10;
acct1.pin = 2005;
acct1.currbal = 100000;
while(condi)
cin>>choice;
if(choice== 1)
condi = acct1.deposit();
else if(choice == 2)
acct1.withdraw();
else if(choice==3)
acct1.disbal();
}
else if(choice==4)
condi = false;
return 0;
ss