title: Basic practice app output. Java
body: <h2><strong>Trying to do this: <a href="http://www.codechef.com/problems/HS08TEST" rel="nofollow">practice app</a>.</strong></h2>
  
  <p>When I test it myself it seems to work perfectly but when I upload my code I get marked incorrect(program runs but output is incorrect- no further information).</p>
  
  <p>All it does is get two inputs, with and bal and check if <code>with 5%=0 &amp;&amp; bal&gt;=with+0.5</code>.
  If both conditions are true it returns <code>bal-(with+0.5)</code>. </p>
  
  <p>Also is there a more efficient (faster code execution) way of doing this?</p>
  
  <pre><code>import java.util.Scanner;
  
  class ATM {
      public static void main(String[] args){
          Scanner in=new Scanner(System.in);
          final float with=in.nextFloat();
          final float bal=(float) ((in.nextFloat())-(with+0.5));
          if (bal&gt;=0 &amp;&amp; with%5==0){
              System.out.print(bal);
          }
      }
  }
  </code></pre>