Difference in if()?
<p>I'm learning C++ and I encountered 2 different types of writing a piece of code, and I wanted to know what the difference is.</p>

<p>Is there any difference between:</p>

<pre><code> if(z==true)
  {
    cout &lt;&lt; "Yes";
  }
  else
  {
    cout &lt;&lt; "NO";
  }
</code></pre>

<p>and:</p>

<pre><code> if(z==true)
  cout &lt;&lt; "YES";
 else
  cout &lt;&lt; "NO";
</code></pre>
