How to call function in other function c++?
<p>The code works fine but the problem is the calculation. how can I call the Cube function to 
the SphereVol function so it calculate right? </p>

<p>The formula - if you're wondering - for the volume of a sphere is 
4/3 * 3.1416 * radius(cubed)  </p>

<pre><code>#include &lt;iostream&gt;
using namespace std;


const float PI = 3.1416;                            

float SphereVol(float num);                        
float Cube(float radius);

void main()
{
   float r,
   radius;

   cout &lt;&lt; "Enter a radius: ";
   cin &gt;&gt; radius;

   r = SphereVol(radius);
   cout &lt;&lt; "Volume of a sphere with a radius " &lt;&lt; radius &lt;&lt; " is " &lt;&lt; r;


}

float SphereVol(float num)
{
   float r;

   r = ( ( 4 / 3 ) * PI * Cube(num) );   

   return r;
}     

float Cube(float radius)
{
   float num;

   num = ( radius * radius * radius );       

   return num;
}
</code></pre>
