Medium
Account Types
Account has deposit and withdraw (refuse if it would go below 0, printing
Refused). SavingsAccount(Account) adds add_interest(rate). Read a balance, n commands (d X, w X, i RATE%) and print the final balance with 2 decimals.Input
Balance, n, then commands.
Output
Messages, then the balance.
Sample 1
Input
1000 3 d 500 i 10 w 2000
Output
Refused 1650.00
Sample 2
Input
0 1 w 1
Output
Refused 0.00
Output appears here