This is my code for the following problem --> http://www.codechef.com/problems/HS08TEST
using namespace std;
there are basically 3 mistakes in your code
- your code does not give any output if withdrawal amount in not a multiple of 5.that means you have not used if else loop properly.
2)this line is wrong amount-withdraw-0.05 as you can see in the question the bank charges are 0.5 not 0.05
3)as you can see the output have 2 decimal places,so in order to get that you have to use fixed & setprecision(2),and have to include #include iomanip
here is link to your code modified by me link text
Thank you!! It works!
Cant believe I didnt notice that extra zero! Oops!