To get 5% of amount you must calculate (5 * amount)/100, which is the same as amount * 0.05f.
In your case
BankAccount.Comision c = amount => amount*0.05f;
1
solved Deduct 5% commission on withdrawal amount Banking System
To get 5% of amount you must calculate (5 * amount)/100, which is the same as amount * 0.05f.
In your case
BankAccount.Comision c = amount => amount*0.05f;
1
solved Deduct 5% commission on withdrawal amount Banking System