Answers for "C++ Volume of a Cylinder"

C++
0

C++ Volume of a Cylinder

int rad, height;
    	float vol;

        cout <<" Input the radius of a cylinder: ";
    	cin >> rad;

        cout << "Input the height of a cylinder: ";
        cin >> height;

    	vol = (3.14 * rad * rad * height) ; //3.14 is the pie

        cout << " The volume of a sphere is : "<< vol << endl;
        cout << endl;
Posted by: Guest on March-09-2022

Browse Popular Code Answers by Language