You are not logged in. Please login at to post your questions!


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: my solution:

asked 15 Aug '14, 02:08

arvindlearner's gravatar image

accept rate: 0%

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.


answered 15 Aug '14, 02:48

gdisastery1's gravatar image

accept rate: 11%

edited 15 Aug '14, 02:48

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 15 Aug '14, 02:08

question was seen: 768 times

last updated: 15 Aug '14, 02:48