Getting "Wrong answer" while submitting the code.

What is the problem in my code? I am getting wrong answer while submitting the code.

my problem: http://www.codechef.com/problems/HS08TEST/
my solution: http://www.codechef.com/viewsolution/4563027

Hi arvindlearner,
the problem statement says:

Output the account balance after the attempted transaction, given as a number with two digits of precision. If there is not enough money in the account to complete the transaction, output the current bank balance.

So check for example the input

5 5.1

Your program returns -0.4, which should not be possible.