| 138 | } |
| 139 | |
| 140 | void Penalty() |
| 141 | { |
| 142 | if (balance - withdraw > 100) |
| 143 | { |
| 144 | balance = balance - withdraw; |
| 145 | cout << " Successfully done!\n\n"; |
| 146 | } |
| 147 | else if (balance - withdraw < 0) |
| 148 | { |
| 149 | cout << " You do not have such balance of money in your account!\n"; |
| 150 | cout << " Your balance is " << balance << endl; |
| 151 | system("pause"); |
| 152 | system("cls"); |
| 153 | Withdraw(); |
| 154 | } |
| 155 | else |
| 156 | { |
| 157 | cout << " Your account balance is less than 100$.\n You got penalty -2$.\n\n"; |
| 158 | balance = balance - withdraw - penalty; |
| 159 | } |
| 160 | } |
| 161 | }; |
| 162 | |
| 163 | class SAV_ACCT : public ACCOUNT |