title: Should I declare a multiplier number as a constant or use it directly as written without declaring?
body: <p>When it comes to multiplying a constant number, in terms of performance / code optimization, is it more efficient to declare it as a constant ? (see pi in first code example below) :</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      double const pi = 3.14;
      int nb;
      cin &gt;&gt; nb;
      double mul_pi = pi * nb;
      return 0;
  }
  </code></pre>
  
  <p>Or should I rather put it directly in the code without declaring it ? (see second code example below) : </p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      int nb;
      cin &gt;&gt; nb;
      double mul_pi = 3.14 * nb;
      return 0;
  }
  </code></pre>
  
  <p>Many Thanks in advance !</p>