title: What's the difference between these 2 'if' and 'if-else' statements?
body: <p>What is the difference between 2 if statements and 1 if-else statement?</p>
  
  <pre><code> int x;
  
   cin &gt;&gt; x;
  
   if (x==10) 
     cout &lt;&lt; "Hello";
  
   if (x!=10) 
     cout &lt;&lt; "Hey";
  </code></pre>
  
  <hr>
  
  <pre><code>int x;
  
  cin &gt;&gt; x;
  
   if (x==10) 
     cout &lt;&lt; "Hello";
  
   else 
     cout &lt;&lt; "Hey";
  </code></pre>