title: How '<=' condition work in c? The following simple program giving strange output :(
body: <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      float x=0;
      while(x&lt;=.2)
      {
          printf("%f\n",x);
          x=x+0.2;
      }
      return 0;
  }
  </code></pre>
  
  <p>The output is </p>
  
  <pre><code>0.000000
  </code></pre>
  
  <p>But it should give..</p>
  
  <pre><code>0.000000
  0.200000
  </code></pre>
  
  <p>I am posting question on stackoverflow for the first time. Please forgive me for my silliness.</p>