title: input a float with two digits of precision
body: <p>I am working on a problem that requires me to input a float with exactly 2 digits of precision.</p>
  
  <p>I know how to print a float with two digits of precision but how can I input a float under this condition? I think this is the problem with my program because there is no compilation error as such but it just says wrong answer. I am working with C language.</p>
  
  <p>I tried to read an <code>int</code> and a <code>float</code> with two digits of precision as required the following way:</p>
  
  <pre><code>int x;
  float balance,y;
  scanf("%d %.2f",&amp;x,&amp;y);
  </code></pre>
  
  <p>For complete references, here are the <a href="http://www.codechef.com/problems/HS08TEST/" rel="nofollow noreferrer">question</a> and my <a href="http://www.codechef.com/viewsolution/5899676" rel="nofollow noreferrer">solution</a></p>