In your ‘Deposit’ case statement, you need to save the new value by assigning the variable balance
with the sum of the original balance plus the deposit, which should be balance + deposit
. So:
balance = balance + deposit
Then you can print out the result:
std::cout << "Remaining Balance: " << balance << std::endl;
4
solved variables that save their values after operations [closed]