Om C
Om C
int new_transaction;
void atm_machine_transaction(){
/*
*/
int option;
float withdraw_amount;
float deposit_amount;
switch(option)
case 1:
balance_amount += deposit_amount;
cout << "Your current balance is Rs. " << balance_amount << ". Thanks for depositing!" << endl;
cout << "Do you want a new transaction?\nPress 1 to 'proceed' and 2 to 'exit' from here\n" << endl;
if (new_transaction == 1){
atm_machine_transaction();
break;
case 2:
cout << "Insufficient fund! Please proceed to deposit money." << endl;
cout << "Do you want a new transaction?\nPress 1 to 'proceed' and 2 to 'exit' from here\n" << endl;
if (new_transaction == 1){
atm_machine_transaction();
else
balance_amount -= withdraw_amount;
cout << "You have withdrawn Rs. " << withdraw_amount << " and your balance is Rs. " <<
balance_amount << endl;
cout << "Do you want a new transaction?\nPress 1 to 'proceed' and 2 to 'exit' from here\n" << endl;
atm_machine_transaction();
break;
case 3:
cout << "Your current bank balance is: " << balance_amount << endl;
cout << "Do you want a new transaction?\nPress 1 to 'proceed' and 2 to 'exit' from here\n" << endl;
if (new_transaction == 1){
atm_machine_transaction();
break;
int main()
atm_machine_transaction();
return 0;