C++ program to compute the surface area and volume of a cylinder using two separate functions : <pre><code>#include&lt;stdio.h&gt;
#include&lt;iostream&gt;
using namespace std;
class Calculate   //class form
{
  int r,h ;

public:
    void getdata()  //input data
    {
        cout&lt;&lt;"Enter the radius and height";
        cin&gt;&gt;r&gt;&gt;h;

    }
    void  Surfacearea()
    {
            float a;
            a= ( ( 2 * 3.14 * r * r ) + ( 2 * 3.14 * r * h ) );
            cout&lt;&lt;"the sa of cylinder is"&lt;&lt;a;
        }
    void volume()
    {
        float v;
        v = ( 3.14 * r * r * h );
     cout&lt;&lt;"the volume of cylinder is"&lt;&lt;v;
}

};
Calculate a1,a2,g; 
int main()
{
g.getdata();    
a1.Surfacearea();
a2.volume();

}
</code></pre>

<p>I am getting surfacearea and volume as zero,i am unable to find error in code,please help me..........................................................................................................................</p>
