title: how to return decimal value in cpp
body: <p>This is my simple program to print pi value from another function (I'm trying to learn function calls). When pi value is given in main(), it shows decimals. But when I try to get it from another function, it shows only 3.</p>
  
  <p>Does "return" returns only integers or is there any thing else?</p>
  
  <p>My Program:</p>
  
  <pre><code>int Pi()
  {
      float a = 3.14159;
      return a;
  }
  
  
  int main()
  {
      float x = Pi();
      std::cout &lt;&lt; std::setprecision(5)&lt;&lt; x &lt;&lt; std::endl;
      return 0;
  
  }
  </code></pre>