title: Why is this float comparison yielding false?
body: <pre><code>#include&lt;iostream&gt;
  using namespace std;
  int main(){
  float a=1.11;
  if(a==1.11){cout&lt;&lt;"yes";} else {cout&lt;&lt;"no";}
  return 0;
  }
  </code></pre>
  
  <p>Result:</p>
  
  <h2>no</h2>
  
  <p>Process exited after 0.2579 seconds with return value 0
  Press any key to continue . . .
  <a href="https://i.stack.imgur.com/QjQ69.png" rel="nofollow noreferrer">Captured Result here</a></p>